PERWAPI.MetaDataElement.CompareTo C# (CSharp) Method

CompareTo() public method

public CompareTo ( object obj ) : int
obj object
return int
        public int CompareTo(object obj)
        {
            uint otherKey = ((MetaDataElement)obj).SortKey();
            uint thisKey = SortKey();
            if (thisKey == otherKey) {
                if (this is GenericParam) {
                    if (((GenericParam)this).Index < ((GenericParam)obj).Index)
                        return -1;
                    else
                        return 1;
                }
                return 0;
            }
            if (thisKey < otherKey) return -1;
            return 1;
        }