How to use your class
Step 1
To use your class, you can try the following. This will actually set your BookName to a value in the textbook. So when you click on Click Me this will then return the name of the book that you have set using the GetBookNme method defined in your class earlier.
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim mystr As String
Dim cbook As Book
cbook = New Book()
cbook.SetBookName = TextBox1.Text
mystr = cbook.GetBookName
MsgBox(mystr, MsgBoxStyle.OKOnly)
End Sub
No comments:
Post a Comment