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

Computer Network & Computer Features | Bal Varg | Computer Questions List!

  Computer Network & Computer Features 1) _______ is a thin strip like bar present at the bottom of the screen.   Taskbar 2) _______ ser...