This is essentially what I am trying to do. I want to allow someone to enter a number on how many times they want to run a specific program. What I can’t figure out is how to change the number 10 into (textBox1.Text). If you have a better way please let me know. I am very new to programming.
int counter = 1;
while ( counter <= 10 )
{
Process.Start("notepad.exe");
counter = counter + 1;
}
This shows how to take the user-supplied input and safely convert it to an integer (System.Int32) and use it in your counter.