Page 1 of 1

VB.NET: Sub (Subroutine)

Posted: Fri Apr 10, 2026 1:54 pm
by Jason

Code: Select all

Sub Main()

End Sub

Sub Example_of_sub()

' A sub is a block of VB.NET code that doesn't return anything.   It's used a lot in VB.  Maybe it's used more than 50 percent of the time.  I'm not sure.

' Subs must start with a letter and the rest of it must be letters, numbers, or underscores and they're not case sensitive.

' How it is setup in a very basic form is seen in this block of code.

End Sub