I write the application - the game "Guess the word" on windowsforms.
The word word is randomly selected from a text file.
This method hides all the letters of this word and instead of them shows the symbol "_" (he did not write himself, copied).
public void MakeLabels() { word = GetRandomWord(); char[] chars = word.ToCharArray(); int between = 330 / chars.Length; for (int i = 0; i < chars.Length; i++) { labels.Add(new Label()); labels[i].Location = new Point((i * between) + 10, 80); labels[i].Text = "_"; labels[i].Parent = groupBox1; labels[i].BringToFront(); labels[i].CreateControl(); } } Tell me, please, how to make sure that all letters except the first one are hidden.
For example, if the word "SPORTS" was shown "C _ _ _ _".