Murray Brown
asked on
VB.net Expression expected
Hi. In the following VB.net class code I get the error "Expression expected"
on the line I marked with a note on the first "&". The error is expression expected
Public Class Class1
Private pJoinTables As String
Property JointTables() As String
Get
Return pJoinTables
End Get
Set(ByVal sValue As String)
If (Not pJoinTables.Contains(sValu e)) Then
pJoinTables = pJoinTables & ',' & sValue 'Error on this line first &
End If
End Set
End Property
End Class
on the line I marked with a note on the first "&". The error is expression expected
Public Class Class1
Private pJoinTables As String
Property JointTables() As String
Get
Return pJoinTables
End Get
Set(ByVal sValue As String)
If (Not pJoinTables.Contains(sValu
pJoinTables = pJoinTables & ',' & sValue 'Error on this line first &
End If
End Set
End Property
End Class
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
& is concat operator and it expects string as input parameters and we represent constant strings with double quotes...
ASKER
Hi. I have asked a further related question
https://www.experts-exchange.com/questions/27676708/VB-net-manipulating-a-class-from-a-standard-module.html
https://www.experts-exchange.com/questions/27676708/VB-net-manipulating-a-class-from-a-standard-module.html
ASKER