Exemplo n.º 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);
        }
Exemplo n.º 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");
        }