Esempio n. 1
0
        public int CompareTo(object obj)         //нужна проверка на null и на соответствие типа (иначе as вернёт null)
        {
            People p = obj as People;

            return(string.Compare(this.Name, p.Name));
        }
Esempio n. 2
0
        public int CompareTo(object obj)
        {
            People p = obj as People;

            return(string.Compare(this.Name, p.Name));
        }