예제 #1
0
        public override bool Equals(object obj)
        {
            if (obj == null)
            {
                return(false);
            }
            if (obj == this)
            {
                return(true);
            }

            if (obj.GetType() == GetType())
            {
                MyString myString1 = (MyString)obj;
                if (myString1.GetHashCode() == this.GetHashCode())
                {
                    return(true);
                }
            }

            return(false);
        }
예제 #2
0
 public bool Contains(MyString myString)
 {
     return(Contains(myString.ToString()));
 }