Public Class Form1
Inherits System.Windows.Forms.Form
Private MyStrPropertySTORAGE As String
Public Property MyStrProperty() As String
Get
' The Get property procedure is called when the value
' of a property is retrieved.
Return MyStrPropertySTORAGE
End Get
Set(ByVal Value As String)
' The Set property procedure is called when the value
' of a property is modified.
' The value to be assigned is passed in the argument to Set.
MyStrPropertySTORAGE = Value
End Set
End Property
Private MyIntPropertySTORAGE As String
Public Property MyIntProperty() As String
Get
' The Get property procedure is called when the value
' of a property is retrieved.
Return MyIntPropertySTORAGE
End Get
Set(ByVal Value As String)
' The Set property procedure is called when the value
' of a property is modified.
' The value to be assigned is passed in the argument to Set.
MyIntPropertySTORAGE = Value
End Set
End Property
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Me.MyStrProperty = "Text" ' This is a string property
Me.MyIntProperty = 1024 ' This is a integer property
End Sub
End Class