clojure.lang.Keyword.Equals C# (CSharp) Method

Equals() public method

Determines if an object is equal to this keyword. Value semantics.
public Equals ( object obj ) : bool
obj object The object to compare to.
return bool
        public override bool Equals(object obj)
        {
            if ( ReferenceEquals(this,obj) )
                return true;

            Keyword keyword = obj as Keyword;

            if (ReferenceEquals(keyword,null))
                return false;

            return _sym.Equals(keyword.Symbol);
        }

Usage Example

Exemplo n.º 1
0
 public object valAt(object key, object notFound)
 {
     if (FormKeyword.Equals(key))
     {
         return(_form);
     }
     else if (TagKeyword.Equals(key))
     {
         return(_tag);
     }
     else
     {
         return(notFound);
     }
 }