Click here to Skip to main content
15,891,423 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
the errors says "Operator '<>' is not defined for types"



VB
For Each clientSend As SocketCoderClient In ClientsList
                If client <> clientSend Then
                    Try
                        clientSend.ReadOnlySocket.Send(aryRet)
                    Catch
                        clientSend.ReadOnlySocket.Close()
                        ClientsList.Remove(client)
                        Return
                    End Try
                End If


OP's additional information moved from non-solution below
Error   2   Operator '<>' is not defined for types 'testvoice_server.SocketCoder.SocketCoderBinaryServer.SocketCoderClient' and 'testvoice_server.SocketCoder.SocketCoderBinaryServer.SocketCoderClient'

this the whole error message
Posted
Updated 18-Nov-12 10:54am
v2
Comments
[no name] 19-Nov-12 16:36pm    
post the c# code too

HI Replace '<>' by Isnot
because '<>' can't be use to compare instance of reference object in Vb.net
 
Share this answer
 
thanks a lot, code worked perfectly!
 
Share this answer
 
That's not the whole error message. But what it means is, it can't compare client and clientSend, they don't have an operator to compare. Are they the same type ? Try giving us the whole, exact error message.
 
Share this answer
 
Comments
Nelek 18-Nov-12 16:55pm    
OP gave a non-solution to answer your request. Please see edited question

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900