Search code examples
c#visual-studiofunctionmessagebox

.show function does not working in visual studio


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.


Solution

  • 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