Mini-Projet 3: Application de To-Do List
Voici un exemple de gestion de To-Do List :
class Tache {
public string Description { get; set; }
public bool Terminee { get; set; }
}
List taches = new List();
void AjouterTache(string description) {
taches.Add(new Tache { Description = description, Terminee = false });
}
void MarquerTerminee(string description) {
var tache = taches.FirstOrDefault(t => t.Description == description);
if (tache != null) tache.Terminee = true;
}
Pas encore de commentaires.
Ajouter un commentaire
Veuillez vous connecter pour ajouter un commentaire.