Esempio n. 1
0
        /// <summary>Compare 2 ArchivingContact objects. They are identical if they have the same Name</summary>
        public int CompareTo(object obj)
        {
            if (obj == null)
            {
                return(1);
            }

            ArchivingContact other = obj as ArchivingContact;

            if (other == null)
            {
                throw new ArgumentException();
            }

            return(String.Compare(Name, other.Name, StringComparison.OrdinalIgnoreCase));
        }
Esempio n. 2
0
 /// <summary>Compare 2 ArchivingContact objects. They are identical if they have the same Name</summary>
 public static int Compare(ArchivingContact contactA, ArchivingContact contactB)
 {
     return(contactA.CompareTo(contactB));
 }