I have the following code:
Thread.CurrentThread.CurrentCulture = new CultureInfo("vi-VN");
string a = "Biển Ðông";
string b = "Biển Đông";
if (a.Equals(b, StringComparison.CurrentCulture))
{
Console.WriteLine("Yes");
}
The two strings are identical, but I always get false
when checking using Equals
. If I add this to a HashSet<string>
, then I will get two items instead of one item in the container.