Module Module1
Class Phone
Public Number As String
Public Sub New(ByVal Number As String)
Me.Number = Number
End Sub
Public Overrides Function ToString() As String
ToString = Number
End Function
End Class
Sub Main()
Dim MyPhone As New Phone("555-1212")
Console.WriteLine(MyPhone)
Console.WriteLine(MyPhone.ToString())
End Sub
End Module
|