<分区>
我有以下代码:
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");
}
这两个字符串是相同的,但我总是得到 false
使用 Equals
检查时.如果我将其添加到 HashSet<string>
,那么我将在容器中得到两件元素而不是一件元素。