-
error
Hi Guys,
I am trying to run my first C# program. Placed a button on the windows form.
Here is the code for the button
private void button1_Click(object sender, System.EventArgs e)
{
messagebox.show("Hello there!");
}
But as the program is run The error is: The type or namespace name 'messagebox' could not be found (are you missing a using directive or an assembly reference?)
Any thoughts pls?
Thanks
-
C# is case-sensitive, therfore, messagebox does not exist in any of the reference assemblies. Use this:
Code:
MessageBox.Show("Hello World");
Have fun. ;)