Define and use structure with modifier : Structure « Class Module « VB.Net Tutorial






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
Coordinates: x=10.2, y=25.1








6.46.Structure
6.46.1.Structure
6.46.2.Define and use Structure
6.46.3.Define and use structure with modifier
6.46.4.Define Structure
6.46.5.By value or by reference
6.46.6.Use Structure as Function parameter
6.46.7.Use With and Structure
6.46.8.Class Vs Structure in ByValue and ByRef
6.46.9.structure implements interface