Comparison of IPEndPoint objects not working

Posted by Martin Mizzell on Stack Overflow See other posts from Stack Overflow or by Martin Mizzell
Published on 2010-05-06T17:09:49Z Indexed on 2010/05/06 17:18 UTC
Read the original article Hit count: 140

Filed under:

I have an IPEndPoint a and b, whose IPAddress and Port are exactly the same, but the == operator is on the IPEndPoint not returning true. To make things even stranger, I tried to circumvent the problem by simply comparing the IPAddress and Port individually and it is STILL not returning true.

Has anyone encountered this before? If so, I am all ears to performant solutions. We have collections of as many as 10k IPEndPoints and are querying into them via LINQ (PLINQ pretty soon).

© Stack Overflow or respective owner

Related posts about c#