Mega Code Archive

 
Categories / VB.Net Tutorial / Language Basics
 

Call static method

Option Strict On Public Module CallStaticMethod    Public Sub Main()       Console.WriteLine(Greeting.SayHello())    End Sub End Module Public Class Greeting    Public Shared Function SayHello() As String       Return "And a top of the morning to you!"    End Function End Class And a top of the morning to you!