P
Peter K
Hi
Is there any way that the following to statements could give different
results?
I have 2 strings (s1 and s2), which if I compare with == are not equal, but
if I compare with string.Equals, then they are equal.
string.Equals(s1, s2) is true
s1 == s2 is false
All this happens really deep down in an application I am testing. So I
haven't yet worked out what is going on, I'd just like a bit of sanity
feedback (I always though that == and Equals on strings were the same).
Thanks,
Peter
Is there any way that the following to statements could give different
results?
I have 2 strings (s1 and s2), which if I compare with == are not equal, but
if I compare with string.Equals, then they are equal.
string.Equals(s1, s2) is true
s1 == s2 is false
All this happens really deep down in an application I am testing. So I
haven't yet worked out what is going on, I'd just like a bit of sanity
feedback (I always though that == and Equals on strings were the same).
Thanks,
Peter