Wednesday, March 5, 2008

Properties of VB.

_____________________________________________

Properties of VB.

_____________________________________________

Private _size As Integer

Public Property Size() As Integer
Get
Return _size
End Get
Set (ByVal Value As Integer)
If Value < 0 Then
_size = 0
Else
_size = Value
End If
End Set
End Property

foo.Size += 1

____________________________________________________________________

Note:Applicable for .net also asp.net.
____________________________________________________________________

No comments: