silverstormboy
Newcomer
hi , I have a question regarding property in vb.net.
for ex:
i have a statusbar control in the form name statusBar and value text = "".
then i create the property as follows:
after that, to call this property :
What is the use of property in vb.net?
why can't we just type:
instead of creating the property?
Some book say that property is very useful and important in vb.net but I do not see it. Please give me advice about this , Thanks.
for ex:
i have a statusbar control in the form name statusBar and value text = "".
then i create the property as follows:
Visual Basic:
Public Property StatusText() as String
Get
Return statusBar.Text
End Get
Set(ByVal Value As String)
statusBar.Text = Value
End Set
End Property
after that, to call this property :
Visual Basic:
StatusText = "Ready"
What is the use of property in vb.net?
why can't we just type:
Visual Basic:
statusBar.Text = "Ready"
Some book say that property is very useful and important in vb.net but I do not see it. Please give me advice about this , Thanks.