public ListCompte lireFichierCompte(ListCompte compte) { string line1; StreamReader file = new StreamReader("DocText/compte.txt"); while ((line1 = file.ReadLine()) != null) { string titre; string image; string ID; string MDP; string nom; string prenom; string email; titre = "Salut " + line1 + " !"; image = file.ReadLine(); ID = file.ReadLine(); MDP = file.ReadLine(); nom = file.ReadLine(); prenom = file.ReadLine(); email = file.ReadLine(); compte.Add(new Compte() { Titre = titre, Image = "/" + image, ID = ID, MDP = MDP, Nom = nom, Prenom = prenom, Email = email }); } file.Close(); return(compte); }