I have a foreach loop that I need to pause in order to allow user input on the form.
foreach (XmlNode node2 in xmlFile)
{
...get currentRow from XML file
...update form label
???wait for user to enter data on form and press button
}
Is there any sort of wait-for-user-input function in C# that I can use to do this?
UPDATE:
Based on the feedback I have successfully modified the program to:
- Load the XML list into a Queue (using the ForEach loop)
- Setup the user input to iterate through the Queue (remove top item, show next top item)