Bonjour
Je tourne en rond sur un truc à priori par très compliqué:

J'ai une liste qui contient des string donc et je souhaite séparé chacun de ces strings par une virgule... je n'y parviens pas.
( je précise que je stocke tout ça dans un string qui s'appelle tmp


Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
        public static string CreateParticipantsList(List<Participant> Participants)
        {
            string tmp = null;
            foreach (var item in Participants)
            {
                tmp =  item.nom + ",";
            }
            return tmp;
 
 
        }
Si ma liste contient

toto,titi,luc , j'obtiens : toto,