Answer the question
In order to leave comments, you need to log in
How to parse numbers for do while in windows form?
I need to parse n-number of numbers into a do while loop, through a textbox, can someone send an example of how to implement this?
Answer the question
In order to leave comments, you need to log in
If I understand correctly (you need to pull out one number and one string each)
Not ideal, but it will
do. Not tested, but something like this:
string[] nums = textBox1.text.Split(' ');
int counter = 0;
do {
int num = nums[counter];
// operations with num
counter++;
}
while (counter < nums.Length);
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question