string Tdans ta boucle
string sep = " "à moins que tu t'en serves ensuite dans la même procédure .
c.Text.ToString()est inutile . La propriété Text d'un contrôle est déjà de type string .
List<string> ListStr = new List<string>(); foreach (Control c in panel1.Controls) { ListStr.Add(c.Text); } MessageBox.Show(string.Join(" ", ListStr);
List<string> ListStr = new List<string>(); foreach (Control c in panel1.Controls) ListStr.Add(c.Text); MessageBox.Show(string.Join(" ", ListStr);
Vous n’avez pas trouvé la réponse que vous recherchez ?
Posez votre questionvar LesTextes = (from c in panel1.Controls select c.Text); MessageBox.Show(string.Join(" ", LesTextes);
MessageBox.Show(string.Join(" ", (from c in panel1.Controls select c.Text));
MessageBox.Show(string.Join(" ", panel1.Controls.Select(c => c.Text)));
4 déc. 2021 à 12:00
Oui c'est vrai ce que tu dis, j'ai appris beaucoup de choses mais en les appliquant c'est une autre chose et merci pour le lien du site de Mr Joachim Tahé .
tu m'as signalé mon erreur et c'est déjà bien et je vais m y mettre et je te tiendrais au courant
Merci