bonjour,

j'aimerais modifier une case de ma liste qui est une liste de structure:

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
public struct Entree
    {
        public string type { get; set; }
        public string motsCle { get; set; }
        public string note { get; set; }
        public DateTime date { get; set; }
        public int id { get; set; }
    }
 
 private List<Entree> tab = new List<Entree>();
 
tab.add(entree);
tab.add(entree1);
tab.add(entree2);
tab.add(entree3);
j'ai essayer de faire

mais le compilateur me dit
Error Cannot modify the return value of 'System.Collections.Generic.List<Entree>.this[int]' because it is not a variable
est ce que quelqu'un peut me dire comment faire ?