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

Popular posts from this blog

c# - ListView onScroll event -

PHP - get image from byte array -

Linux Terminal Problem with Non-Canonical Terminal I/O app -