9 Replies
You iterate the array using a for-loop, and set the string to
""
so it work but we need to go back to the first row of the label
so that the letter S come back
Then you need to skip the first index
if (i == 0) continue;
Little side note: I think you can make this much easierThat means the index is out of bounds. the index must match an entry in the array
So
Timer
is not a valid indexbut how do we fix that?
owh i found iot
Timer = 0
for (int i = 0; i < Labels.Length; i++)
{
Labels[i].Text = "";
if (i == 0) continue;
Timer = 0;
}
Labels[0].Text = strLingo.Substring(0, 1);
bro thanks really apriciated your help!
Geen probleem 🙃
It might be easier to use a List as it has some more capabilities and it's not as strict
In your case it might be a good idea to keep a List of sentences that the user has tried, so that you can just use the next entry rather than removing the current one
Not sure how you can do that in a forms project though
Was this issue resolved? If so, run
/close
- otherwise I will mark this as stale and this post will be archived until there is new activity.