Imports System
Module Test
Sub Main()
Dim p1 as New Point()
Dim p2 as New Point(100,100)
Console.WriteLine(p1)
Console.WriteLine(p2)
End Sub
End Module
Class Point
Private X as Integer
Private Y as Integer
Sub New()
End Sub
Sub New(x as integer, y as Integer)
Me.X = x
Me.Y = y
End Sub
Public Overrides Function ToString() as String
Return("(" & X & "," & Y & ")")
End function
End Class
|