MessageBox in C# Console Application

Posted at

to use the MessageBox Class in c#, you will need to add reference to System.Windows.Forms (in System.Windows.Forms.dll).

follow those 1-4 easy steps:

1. Open Solution Explorer.
2. Right Click References, select Add References.

3. Select System.Windows.Forms, Click OK.
4. Add the Namespace to your class by adding the line using System.Windows.Forms; at the top.
The MessageBox is now fully usable.