Hi,
Welcome to MSDN Newsgroup!
If we want to pop up messagebox in console app, we should add the reference
to System.Windows.Forms.dll. You could refer to the following code and I
hope it's useful for you,
using System;
namespace ConsoleApplication1
{
/// <summary>
/// Summary description for Class1.
/// </summary>
class Class1
{
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main(string[] args)
{
//
// TODO: Add code to start application here
//
System.Windows.Forms.MessageBox.Show("Hello World");
}
}
}
If there is any question, please feel free to join the community and we are
here to support you at your convenience. Thanks again and have a nice day.
Best Regards,
Terry Fei[MSFT]
Microsoft Community Support
Get Secure!
www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)