title: How to design the workflow in a C# WinForms application?
body: <p>this might be a very general question - but I'm quite new to C#.
  Can you please explain this to me or give me a good link to an example or explanation.</p>
  
  <p>I want to design a C# Winform application.
  The application has a main form, which collects user input when needed.
  Together with the UI a complex an long running calculation algorithm is developed.
  Start of calculation is triggered from a button on the main form. (CaculateClass.Start())</p>
  
  <p><strong>Question 1:</strong>
  At some point in time deep in the method call stack of the CaculateClass the CaculateClass detects that it needs further input from the user to continue the calculation.</p>
  
  <p>In ancient C++ console application times one would have done something like this:
      cout &lt;&lt; "Ask question";
      cin >> answer;</p>
  
  <p>How is this done in C# with winforms, to pass control to the UI from somewhere deep in the call stack, get input and return to the place where the calculation was interupted?
  Or has the CaculateClass to be designed somehow completely different?</p>
  
  <p><strong>Question 2</strong>
  To avoid freezing of the UI a lot of articles recommend to put such long running calculations into another thread - e.g. by using BackgroundWorker()</p>
  
  <p>If I let the CaculateClass.Start() be calculated by a BackgroundWorker -> How does the collecting user input work then?</p>
  
  <p>Thanks for any help,
  CS</p>