I have a dll which contains a method which displays a form and passes it an object and two reference variables:
public void MyMethod(..variables, ref DataString, ref DataCount)
{
// Code to create object..
Form myForm = New Form(MyObject, ref DataString, ref DataCount);
myForm.Show();
}
However, I don’t want the method to close until the user has done a load of stuff on “myForm” and I know the reference variables are populated.
What is the best way to make MyMethod wait until the user is finished on the form before exiting?
Just use
This will force
MyMethodto wait untilmyFormis closed.