[RESOLVED] I need to pop up a messagebox in Console
Hi ,
========================================
Error 1 The type or namespace name 'Windows' does not exist in the namespace 'System' (are you missing an assembly reference?)
========================================
what is wrong with this code please ?
Code:
using System;
using System.Windows.Forms;
namespace MsgBox
{
class Program
{
static void Main(string[] args)
{
MessageBox.Show("Hello World");
}
}
}
Re: I need to pop up a messagebox in Console
You must add a reference to System.Windows.Forms.
Re: I need to pop up a messagebox in Console
but I have done the reference No?
using System.Windows.Forms;
++++++++++++++++++++
okay thanks solved
Re: [RESOLVED] I need to pop up a messagebox in Console
No, those aren't references.
See this post, which explains the difference between what you've done and a reference:
http://www.vbforums.com/showpost.php...79&postcount=9
Re: [RESOLVED] I need to pop up a messagebox in Console
From the exception itself which you posted asked "are you missing an assembly reference?" so you should have gotten a hint from that. =)