Friday, July 4, 2014

VB.NET CODE FOR FUNCTION


Module Module1
    Sub Main()
Dim i As Integer = 5
        Dim j, res As Integer
        res = fun(i, j)
        Console.WriteLine(j & " " & res)
        Console.ReadKey()
    End Sub

    Function fun(ByVal x As Integer, ByRef y As Integer) As Integer
        y = x * x
        Return x * x * x
    End Function
End Module

output
25 125

No comments:

Post a Comment

JAC Board Computer || IIT 2025 || Introductory Information Technology || Class 10 || Practical Examination 2025

Marks Division HOE 30 Marks IT Application Report File 20 Marks Viva - Voce 10 Marks 1) Write an HTML code to generate a web p...