Option Strict On
Public Structure Coordinates
Public x As Double
Public y As Double
End Structure
Public Module Test
Public Sub Main()
Dim coord As Coordinates ' The structure as a whole
coord.x = 10.2 ' x member
coord.y = 25.1 ' y member
Console.WriteLine(coord.ToString & ": x=" & coord.x & ", y=" & coord.y)
End Sub
End Module
|