2
Answers

Question about String.Equals()

Ask a question
Jack Li

Jack Li

14y
1.8k
1
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)