//static void Main(string[] args) //{ // SalarieS listeSalaries=new SalarieS(); // listeSalaries.Add(new Salarie() { Matricule = "12XXX12",Nom = "bost", Prenom = "vincent" }); // listeSalaries.Add(new Salarie() { Matricule = "12XXX13", Nom = "tartempion", Prenom = "gilbert" }); // listeSalaries.Add(new Salarie() { Matricule = "12XXX12", Nom = "bost", Prenom = "vincent" }); // Console.WriteLine("Attendu true {0}", 2 == listeSalaries.Count); // Salarie salASupprimmer = listeSalaries.Extraire("12XXX13"); // listeSalaries.Remove(salASupprimmer); // Console.WriteLine("Attendu true {0}", 1 == listeSalaries.Count); // listeSalaries.Remove("12XXX12"); // Console.WriteLine("Attendu true {0}", 0 == listeSalaries.Count); // Console.ReadLine(); //} static void Main(string[] args) { SalariesHS listeSalaries = new SalariesHS(); listeSalaries.Add(new Salarie() { Matricule = "12XXX12", Nom = "bost", Prenom = "vincent" }); listeSalaries.Add(new Salarie() { Matricule = "12XXX13", Nom = "tartempion", Prenom = "gilbert" }); listeSalaries.Add(new Salarie() { Matricule = "12XXX12", Nom = "bost", Prenom = "vincent" }); Console.WriteLine("Attendu true {0}", 2 == listeSalaries.Count); Salarie salASupprimmer = listeSalaries.Extraire("12XXX13"); listeSalaries.Remove(salASupprimmer); Console.WriteLine("Attendu true {0}", 1 == listeSalaries.Count); listeSalaries.Remove("12XXX12"); Console.WriteLine("Attendu true {0}", 0 == listeSalaries.Count); Console.ReadLine(); }
static void Main(string[] args) { /* Salaries listeSalaries = new Salaries(); * listeSalaries.Add(new Salarie() { Matricule = "12abc34", Nom = "JeSAppelle", Prenom = "groot" }); * listeSalaries.Add(new Salarie() { Matricule = "12abc35", Nom = "JeSAppelle1", Prenom = "groot1" }); * listeSalaries.Add(new Salarie() { Matricule = "12abc34", Nom = "JeSAppelle", Prenom = "groot" }); * Console.WriteLine("Attendu true {0}", 2 == listeSalaries.Count); * Salarie salASupprimer = listeSalaries.Extraire("12abc35"); * listeSalaries.Remove(salASupprimer); * Console.WriteLine("Attendu true {0}", 1 == listeSalaries.Count); * listeSalaries.Remove("12abc34"); * Console.WriteLine("attendu true {0}", 0 == listeSalaries.Count); * * Console.ReadLine(); * }*/ SalariesHS listeSalaries = new SalariesHS(); listeSalaries.Add(new Salarie() { Matricule = "12abc34", Nom = "JeSAppelle", Prenom = "groot" }); listeSalaries.Add(new Salarie() { Matricule = "12abc35", Nom = "JeSAppelle1", Prenom = "groot1" }); listeSalaries.Add(new Salarie() { Matricule = "12abc34", Nom = "JeSAppelle", Prenom = "groot" }); Console.WriteLine("Attendu true {0}", 2 == listeSalaries.Count); Console.WriteLine("Attendu true {0}", 2 == listeSalaries.Count); Console.WriteLine("attendu true {0}", 2 == listeSalaries.Count); Console.ReadLine(); }