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.

有帮助吗?

解决方案

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

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top