RTools.Util.IntToken.Equals C# (CSharp) 메소드

Equals() 공개 메소드

Override, see base Token
public Equals ( object other ) : bool
other object
리턴 bool
        public override bool Equals(object other)
        {
            if ((object)other == null) return (false);
            if (!GetType().Equals(other.GetType())) return (false);
            if ((obj == null) || (((IntToken)other).obj == null)) return (false);
            if (!obj.GetType().Equals(((IntToken)other).obj.GetType())) return (false);
            if (obj is Int32)
            {
                if (((Int32)obj).Equals((Int32)((IntToken)other).Object)) return (true);
            }
            else
            {
                if (((Int64)obj).Equals((Int64)((IntToken)other).Object)) return (true);
            }
            return (false);
        }
    }