コード例 #1
0
 public void CompareToTest1()
 {
     using NativeString str = "Hola";
     Assert.AreEqual(1, str.CompareTo("Hi"));
     Assert.AreEqual(1, str.CompareTo("Hello"));
     Assert.AreEqual(0, str.CompareTo("Hola"));
 }
コード例 #2
0
 public void CompareToTest2()
 {
     using NativeString str = "Hola";
     Assert.AreEqual(0, str.CompareTo("HOLA", StringComparison.CurrentCultureIgnoreCase));
 }