示例#1
0
        int IComparable.CompareTo(object obj)
        {
            ItemVM bObj = (ItemVM)obj;

            if (this != bObj)
            {
                string a = Name;
                string b = bObj.Name;
                return(a.CompareTo(b));
            }
            return(0);
        }
示例#2
0
        int IComparable.CompareTo(object obj)
        {
            ItemVM bObj = (ItemVM)obj;

            if (this != bObj)
            {
                string a      = DisplayName;
                string b      = bObj.DisplayName;
                int    result = a.CompareTo(b);
                if (0 == result && null != Variant && null != bObj.Variant)
                {
                    result = Variant.CompareTo(bObj.Variant);
                }
                return(result);
            }
            return(0);
        }