Sunday, 27 August 2017

How to run array reference variable in vb.net

1. Module4.vb

Module Module4
    Sub Main()
        Dim array() As Integer = {5, 10, 20}
        ' Pass array as argument.
        Console.WriteLine(Example(array))
        Console.ReadLine()
    End Sub
    ''' <summary>
    ''' Receive array parameter.
    ''' </summary>
    Function Example(ByVal array() As Integer) As Integer
        Return array(0) + 10
    End Function
End Module

0 comments

Post a Comment