Demonstrates Me reference : Me « Class Module « VB.Net Tutorial






Module Tester

   Sub Main()
      Dim time As New MyTime(12, 30, 19)

      Console.WriteLine(time.ToUniversalString())
   End Sub ' Main

End Module


Class MyTime
   Private mHour, mMinute, mSecond As Integer

   Public Sub New(ByVal mHour As Integer, _
      ByVal mMinute As Integer, ByVal mSecond As Integer)

      Me.mHour = mHour
      Me.mMinute = mMinute
      Me.mSecond = mSecond
   End Sub ' New

   Public Function ToUniversalString() As String
      Return String.Format("{0:D2}:{1:D2}:{2:D2}", _
         mHour, mMinute, mSecond)
   End Function ' ToUniversalString

End Class
12:30:19








6.18.Me
6.18.1.Use Me to reference myself
6.18.2.Demonstrates Me reference