Skip to content

Instantly share code, notes, and snippets.

@kainio
Last active May 13, 2018 08:59
Show Gist options
  • Save kainio/701fbc0b55a2dcab02263e0a7b1f5c38 to your computer and use it in GitHub Desktop.
Save kainio/701fbc0b55a2dcab02263e0a7b1f5c38 to your computer and use it in GitHub Desktop.
La fonction Split()
// Déclaration du sépérateur
char[] separator = { ' ' };
// Exemple
string nom = "Anass anass";
string[] mots = nom.Split(separator);
// Exemple: utilisation en windowsfroms avec listbox
listBox1.Items.AddRange(textBox1.Text.Split(separator));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment