Frage

I recently installed Visual Studio 2010 and when I write

MessageBox.show("hello ");

It says show does not exists in type of system.windows.form.Message-box.

War es hilfreich?

Lösung

C# is case sensetive language. So "Show" and "show" are different.
MessageBox.Show("hello ");
You may need to add using statement if there isn't System.Windows.Forms
using System.Windows.Forms;
You can also type fully.
System.Windows.Forms.MessageBox.Show("hello ");
If dll is not referenced, it's in System.Windows.Forms.dll

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top