!Contains() of List object doesnt work
Posted
by Tony
on Stack Overflow
See other posts from Stack Overflow
or by Tony
Published on 2010-03-31T20:23:17Z
Indexed on
2010/03/31
20:33 UTC
Read the original article
Hit count: 266
c#
I am using Contains() to identify something that NOT contain in the list. So something like,
if(!list.Contains(MyObject)) { //do something }
but, the whole if statment goes to true even though MyObject is already in the list.
Anybody what I am doing wrong?
Thank you
© Stack Overflow or respective owner