officemanager2
Technical User
Hello: Below is an example from the Visual Basic.net for complete beginners
and that is what I am. This is from the third chapter and everything was
going fine until the exercise to create a third text box that would input the
result of WholeName based on the FirstName LastName text boxes. The code to
put the result in a message box is straight forward but putting the result
into a text box is proving problematic.
The error is
Property access must assign to the property or use its value.
I've looked up this error and it seems that others have had the same problem
and those good at working with VB.net say the issue is straight forward but
I'm no further along with a solution or understanding the full extent of the
problem.
What I can put together I need to turn this class into a method, but this was
not covered in the chapter so I'm not sure what the author was thinking.
Either way I'll keep reviewing what I find on line, but if anyone has some
tips/direction I'm open to learn.
thanks
and that is what I am. This is from the third chapter and everything was
going fine until the exercise to create a third text box that would input the
result of WholeName based on the FirstName LastName text boxes. The code to
put the result in a message box is straight forward but putting the result
into a text box is proving problematic.
Code:
Public Class Form1
Private Sub StringTest_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Combine.Click
Dim FirstName As String
Dim LastName As String
Dim WholeName As String
FirstName = txtFirstName.Text
LastName = txtLastName.Text
WholeName = FirstName & " " & LastName
End Sub
Public Property WholeName() As String
Get
Return WholeName
End Get
Set(ByVal WholeName As String)
End Set
End Property
End Class
The error is
Property access must assign to the property or use its value.
I've looked up this error and it seems that others have had the same problem
and those good at working with VB.net say the issue is straight forward but
I'm no further along with a solution or understanding the full extent of the
problem.
What I can put together I need to turn this class into a method, but this was
not covered in the chapter so I'm not sure what the author was thinking.
Either way I'll keep reviewing what I find on line, but if anyone has some
tips/direction I'm open to learn.
thanks