The code that is failing is the
if( o == test) ?
well o and test are both typed as object so you are using the System.Object == operator which hands off to System.Object.ReferenceEquals. In other words, the comparison will onyl succeed if o and test are teh same physical object
Regards
Richard Blewett - DevelopMentor
http://staff.develop.com/richardb/weblog
nntp://news.microsoft.com/microsoft.public.dotnet.languages.csharp/<29*************************@posting.google.com>
I've a really strange problem, in some part of my code I compare two
strings (through object), and while I *know* that they equal each
other, and in the watch window they do equal each other, then the
comparision return false.
See here for details:
http://www.ayende.com/Blog/PermaLink...c876a6acb.aspx
---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (
http://www.grisoft.com).
Version: 6.0.771 / Virus Database: 518 - Release Date: 28/09/2004
[microsoft.public.dotnet.languages.csharp]