using System;
public class EHClass
{
static void Main()
{
string s1 = new string(new char[] { '.', 'n', 'e', 't' });
string s2 = ".net";
string s3 = ".net";
Console.WriteLine(s1 == s2);
Console.WriteLine(s2 == s3);
Console.WriteLine((object)s1 == (object)s2);
Console.WriteLine((object)s2 == (object)s3);
Console.WriteLine(s1 == (object)s2);
Console.WriteLine(s2 == (object)s3);
Console.WriteLine((object)s1 == s2);
Console.WriteLine((object)s2 == s3);
Console.WriteLine(s1.Equals (s2));
Console.ReadLine();
}
}
结果是:true,true,false,true,false,true,false,true,true.
有人知道第三个,第五个,还有第七个,为什么是"false".小弟谢过了!