using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace TestString
{
class Program
{
static void Main(string[] args)
{
string a = "hello";
string b = "h";
b +="ello";
string c = "hello";
if ((object)a == (object)b)
{
Console.WriteLine("True");
}
else
{
Console.WriteLine("False");
}
if ((object)a == (object)c)
{
Console.WriteLine("True");
}
else
{
Console.WriteLine("False");
}
}
}
}
.net(关于字符串的相等问题[比较重要])
最新推荐文章于 2021-07-10 07:39:48 发布