public int Compare(object x, object y) { Persoana pers1 = x as Persoana; Persoana pers2 = y as Persoana; //if(pers1.nume>pers2.nume) return(String.Compare(pers1.nume, pers2.nume)); }
static void Main(string[] args) { Persoana darius = new Persoana("Darius", 20); Persoana andreea = new Persoana("Andreea", 20); Persoana david = new Persoana("David", 20); Console.WriteLine(); Console.ReadKey(); }