I have two lines.
one is "\" "
and the other is "\" "
I think they are the same.
However, String.Compare says they are different.
It is very strange.
Here is my code.
string b = "\""; string c = "\""; if (string.Compare(b, c) == 0) { Console.WriteLine("Good"); } if (c.StartsWith("\"")) { Console.WriteLine("C"); } if (b.StartsWith("\"")) { Console.WriteLine("B"); }
I expected him to print "GoodCB."
However, it only prints “B”.
In my debugger, c [0] is 65279 ”, and c [1] is 34”, and b [0] is “”.
But I do not know what 65279 is. ''
Is there an empty character?
Thank.
c # char
장 선민 Jul 22 2018-11-11T00: 00Z
source share