hi, i am learning about properties statement. i
i have read on the msdn and know : properties statement used for declaring the name of a property, and the property procedures used to store and retrieve the value of the property.
i learned about structure of it. but i cant figure out it clearly. please give me a simple example for me understanding about it. thanks .
this is structure of it :
Code:Class Class1 ' Define a local variable to store the property value. Private PropertyValue As String ' Define the property. Public Property Prop1() As String Get ' The Get property procedure is called when the value ' of a property is retrieved. Return PropertyValue 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. PropertyValue = Value End Set End Property End Class




Reply With Quote