We declare and call a Sub procedure. We use different syntaxes to call the procedure. The program also shows XML comments. Subroutines return no value to the caller.
Module Module1
Sub Main()
'
' Call the Sub Procedure, which returns no value.
' ... You can put all the arguments on one line.
'
WriteArguments(1, 2, 3, 4, 5)
'
' Call the Sub Procedure again.
' ... You can use the line continuation marker to break up the lines.
'
WriteArguments(1000, _
2000, _
3000, _
4000, _
5000)
End Sub
''' <summary>
''' Prints out the five arguments.
''' </summary>
''' <param name=
"param1">Description 1.</param>
''' <param name=
"param2">Description 2.</param>
''' <param name=
"param3">Description 3.</param>
''' <param name=
"param4">Description 4.</param>
''' <param name=
"param5">Description 5.</param>
''' <remarks>Made by Dot Net Perls.</remarks>
Sub WriteArguments(ByVal param1 As Integer, _
ByVal param2 As Integer, _
ByVal param3 As Integer, _
ByVal param4 As Integer, _
ByVal param5 As Integer)
Console.WriteLine(param1)
Console.WriteLine(param2)
Console.WriteLine(param3)
Console.WriteLine(param4)
Console.WriteLine(param5)
End Sub
End Module
1
2
3
4
5
1000
2000
3000
4000
5000