ParamArray Parameter (Variable Args) : Varied length method parameter « Class Module « VB.Net Tutorial






Module Module1

    Sub Main()
        ShowMessage("Hello there!")
        ShowMessage("Hello", " there!")
    End Sub

    Sub ShowMessage(ByVal ParamArray Text() As String)
        Dim i As Integer
        For i = 0 To UBound(Text)
            System.Console.Write(Text(i))
        Next i

    End Sub

End Module
Hello there!Hello there!"








6.7.Varied length method parameter
6.7.1.Using ParamArray to create variable-length parameter lists.
6.7.2.Varied length Method parameter
6.7.3.ParamArray Parameter (Variable Args)