c# - Why is .Equal False when i expect it to be true? -
The first line is true, the second is false HtmlOut and the S2 StringWriter object.
bool b = s2.ToString () == htmlOut.ToString (); Rate = htmlOut.Equals (s2);
I hope that which is b, but why is it wrong?
The stringwriter does not override the object. Ecloss
htmlOut.Equals (s2);
equals:
object.ReferenceEquals (htmlOut, s2);
Comments
Post a Comment