SIGN UP MEMBER LOGIN:    
Blog

Sub Procedure in VB.NET

Posted by Micalgray Blogs | Visual Basic Language Mar 15, 2011
This blog defines the sub procedure in VB.NET.
HTML clipboard

 Sub Procedures

Sub procedures are methods which do not return a value. Each time when the Sub procedure is called the statements within it are executed until the matching End Sub is encountered.

Starting Point Sub Main()

Sub Main(), the starting point of the program itself is a sub procedure. When the application starts execution, control is transferred to Main Sub procedure automatically which is called by default.

For example

Module Module1

    Sub Main()

        Console.WriteLine("This is a Main! ")

        SomeMethod()

        Console.WriteLine("control Back in Main( ).")

    End Sub 'Main

 

    Sub SomeMethod()

        Console.WriteLine(" From method!")

    End Sub

End Module

 

OUTPUT

s1.gif

share this blog :
post comment