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

            return(s != null ? s._value == _value : false);
        }
예제 #2
0
        public int CompareTo(object obj)
        {
            JSEvalString s = obj as JSEvalString;

            if (s != null)
            {
                return(String.Compare(_value, s._value, StringComparison.InvariantCulture));
            }
            if (obj is String)
            {
                return(String.Compare(_value, (String)obj, StringComparison.InvariantCulture));
            }
            throw new ArgumentException("Must be a string.", "obj");
        }