Call static method : static « Language Basics « VB.Net Tutorial






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!








1.7.static
1.7.1.static Variable
1.7.2.Call static method