Add a reference to
InputBox is in the
using Microsoft.VisualBasic; string input = Interaction.InputBox("Prompt", "Title", "Default", -1, -1);
To sum it up:
You can use the dialog from Visual Basic by adding a reference to Microsoft.VisualBasic:
Then you can use the previously mentioned code:
string input = Microsoft.VisualBasic.Interaction.InputBox("Prompt", "Title", "Default", 0, 0);
That said, I suggest that you consider the need of an input box in the first place. Dialogs are not always the best way to do things and sometimes they do more harm than good - but that depends on the particular situation.