Define and Call Function : Function « Language Basics « VB.Net






Define and Call Function

Define and Call Function
Imports System

Public Class MainClass

    Shared Sub Main(ByVal args As String())
       Console.WriteLine("In Main! Calling SomeMethod( )...")
       SomeMethod( )
       Console.WriteLine("Back in Main( ).")
    End Sub

    Shared Sub SomeMethod( )
       Console.WriteLine("Hi")
    End Sub 'SomeMethod

End Class

           
       








Related examples in the same category

1.Define and use FunctionDefine and use Function
2.Define and Use Function: Shared Function