By the look of it, that is a console app - whiule you can display a message box from a Console app, it isn't really a good idea.
If you must, then:
1) Add a Reference to System.Windows.Forms to your project.
2) Add the line:
using System.Windows.Forms;
To your code.
3) You can now use MessageBox.Show instead of Console.WriteLine.
But it is a much, much better idea to switch to a WinForms app instead.