Jack Li

Jack Li

  • NA
  • 1
  • 0

Question about String.Equals()

Oct 21 2009 8:32 PM
Why the following code(#1) returns false but code (#2) returns true. (#1) string temp = sbTemp.ToString(); return temp.Equals(expectedOutputStream.ReadToEnd()); (#2) string temp = sbTemp.ToString(); string expectedOutput = expectedOutputStream.ReadToEnd(); return temp.Equals(expectedOutput);

Answers (2)