messagebox.show produces error???

  • Thread starter Thread starter Dan
  • Start date Start date
D

Dan

I am using Visual Studio .net 2003 (C#)

I have a line of code like:
messagebox.show("Hello");


I get the erorr message "The type or namespace name 'messagebox' could not
be found (are you missing a using directive or an assembly reference?)
"

MessageBox.Show("Hello"); Does NOT product the error.

Also, normally, I get a dropdown list of available commands, but after
typing messagebox. , nothing appears.

Anybody know what's going on?
 
Dan said:
I am using Visual Studio .net 2003 (C#)

I have a line of code like:
messagebox.show("Hello");


I get the erorr message "The type or namespace name 'messagebox' could not
be found (are you missing a using directive or an assembly reference?)
"

MessageBox.Show("Hello"); Does NOT product the error.

Also, normally, I get a dropdown list of available commands, but after
typing messagebox. , nothing appears.

Anybody know what's going on?
Previous experience with VB, perhaps?
As C# is case-sensitive, why would you expect messagebox to be accepted in
place of the correct MessageBox?
If you are migrating from VB, where incorrect case is automatically
corrected if the typed identifier is recognized, you'll need to get used to
case-sensitivity. You will get the dropdown intellisense list, but only if
you spell the qualifying identifier correctly.
 
Dan said:
That did it!
And you are correct, I've been using Visual Basic and am new to C#.
Well, welcome to the C family of programming languages!
If you have additional questions on C#, you may get better results using the
C#-dedicated newsgroup:

microsoft.public.dotnet.languages.csharp

The group names are a bit confusing at first, but this group (.vc) is for
C++. When you decide to try C++, this would be a good place for questions.
 
Back
Top