I'm still having a little difficulty understanding your question but I'll answer it to the best of my ability.
You have a TextBox control on a windows form. The user types in "3,25" into the textbox. You want 3 to be your starting number and you want to look until 25 (the end count).
If your user types "7,12,52" into the textbox, this is not a valid input because you have an extra number. So tell your user he made a mistake and to try again.
string Input = textBox1.Text;
string[] Splitted = Input.Split(new char[] {','}, StringSplitOptions.RemoveEmptyEntries);
if (Splitted.Length == 2)
{
int Start = Int32.Parse(Splitted[0]);
int End = Int32.Parse(Splitted[1]);
for (int i = Start; i < End; i++)
{
// do stuff in this loop
}
}
else
{
MessageBox.Show("You can only have 2 numbers in the textbox separated by one comma. Please try again.", "Get it right");
// Computer.CallBSOD();
}