Пример #1
0
            int IComparer.Compare(object a, object b)
            {
                ContactNumber c1 = (ContactNumber)a;
                ContactNumber c2 = (ContactNumber)b;

                int n = string.Compare(c1.getCode(), c2.getCode());

                return(n);
            }
Пример #2
0
        /// <summary>
        /// Default Alphabetical Sort by Number Value
        /// </summary>
        int IComparable.CompareTo(object obj)
        {
            ContactNumber c = (ContactNumber)obj;

            return(string.Compare(this.number, c.getNumber()));
        }