示例#1
0
        public bool Equals(RuneString other)
        {
            if (other.IsNull())
            {
                return(false);
            }
            else if (base.Equals(other))
            {
                return(true);
            }
            else if (this.hashcode == other.hashcode && this.Length == other.Length)
            {
                for (int i = 0; i < runes.Length; i++)
                {
                    if (runes[i] != other.runes[i])
                    {
                        return(false);
                    }
                }

                return(true);
            }
            else
            {
                return(false);
            }
        }
示例#2
0
 public static bool IsEqualTo(RuneString left, RuneString right)
 {
     if (left.IsNull())
     {
         return(right.IsNull());
     }
     else
     {
         return(left.Equals(right));
     }
 }
示例#3
0
 public static int Compare(RuneString left, RuneString right)
 {
     if (left.IsNull())
     {
         if (right.IsNull())
         {
             return(0);
         }
         else
         {
             return(-1);
         }
     }
     else
     {
         return(left.CompareTo(right));
     }
 }