I want to prevent late binding of this statement:
MyServerConnect ions(Myindex).c lient = Value
But when I try with the code below, I get an editor error:
"Expression is a value and therefor cant be the target of an assignment"
CType(MyServerC onnections(Myin dex), PrivateServerCo nnectionStruct) .Client =
value
What is going on here?
For reference, here is the struct definition:
Private Structure PrivateServerCo nnectionStruct
Dim client As System.Net.Sock ets.TcpClient
Dim Connected_To_Se rver As Boolean
Dim Connected_User_ Name As String
Dim Remote_port_num As Integer
Dim Remote_host_nam e As String
Dim MessageQueue As Queue
End Structure
Dim MyServerConnect ions As New ArrayList
MyServerConnect ions(Myindex).c lient = Value
But when I try with the code below, I get an editor error:
"Expression is a value and therefor cant be the target of an assignment"
CType(MyServerC onnections(Myin dex), PrivateServerCo nnectionStruct) .Client =
value
What is going on here?
For reference, here is the struct definition:
Private Structure PrivateServerCo nnectionStruct
Dim client As System.Net.Sock ets.TcpClient
Dim Connected_To_Se rver As Boolean
Dim Connected_User_ Name As String
Dim Remote_port_num As Integer
Dim Remote_host_nam e As String
Dim MessageQueue As Queue
End Structure
Dim MyServerConnect ions As New ArrayList
Comment