Imports System
Structure myStruct
Private n As Integer
Public Property number As Integer
Get
Return n
End Get
Set(ByVal value As Integer)
n = value
End Set
End Property
Public Sub Print()
Console.WriteLine("n = {0}", n)
End Sub
End Structure
Class Program
Public Shared Sub Main(ByVal args As String())
Dim mystruct As myStruct = New myStruct()
mystruct.number = 300
Console.WriteLine(mystruct.number)
mystruct.Print()
End Sub
End Class
' run:
'
' 300
' n = 300
'