📌  相关文章
📜  C# 检查变量是否相等 - C# 代码示例

📅  最后修改于: 2022-03-11 14:48:55.939000             🧑  作者: Mango

代码示例1
string str1 = "1";
string str2 = "1";

if(String.Compare(str1, str2) == 0)
{
    Console.WriteLine(str1 + " and " + str2 + " are equal");
}
else
{
    Console.WriteLine(str1 + " and " + str2 + " are not equal");
}
Console.ReadKey();