compare() public static method

public static compare ( string self, object obj ) : long
self string
obj object
return long
Example #1
0
 public static long compare(object self, object x)
 {
     if (self is FanObj)
     {
         return(((FanObj)self).compare(x));
     }
     else if (self is string)
     {
         return(FanStr.compare((string)self, x));
     }
     else if (self is IComparable)
     {
         return(((IComparable)self).CompareTo(x));
     }
     else
     {
         return(FanStr.compare(toStr(self), toStr(x)));
     }
 }
Example #2
0
 public virtual long compare(object obj)
 {
     return(FanStr.compare(toStr(), toStr(obj)));
 }