How to declare your class property in VB.Net
Step 1
To declare class property in VB.net, use the keyword Property and together with Get and Set method.
Private BookName As String
Property SetBookName() As String
Get
Return BookName
End Get
Set(ByVal Value As String)
BookName = Value
End Set
End Property
ReadOnly Property GetBookName() As String
Get
Return BookName
End Get
End Property
This actually defines a class with 2 method called GetBookName() and SetbookName()
No comments:
Post a Comment