public static class MessageBox { public static void Show(Gtk.Window parent_window, DialogFlags flags, MessageType msgtype, ButtonsType btntype, string msg) { MessageDialog md = newMessageDialog (parent_window, flags, msgtype, btntype, msg); md.Run (); md.Destroy(); } public static void Show(string msg) { MessageDialog md = newMessageDialog (null, DialogFlags.Modal, MessageType.Info, ButtonsType.Ok, msg); md.Run (); md.Destroy(); } } 

When compiling swears at:

 MessageBox.cs(3,52): error CS0246: The type or namespace name `DialogFlags' could not be found. Are you missing `Gtk' using directive? MessageBox.cs(3,71): error CS0246: The type or namespace name `MessageType' could not be found. Are you missing `Gtk' using directive? MessageBox.cs(3,92): error CS0246: The type or namespace name `ButtonsType' could not be found. Are you missing `Gtk' using directive? 

    1 answer 1

    Practically it did not work with MonoDevelop, but judging by the compilation log shown above, you forgot to specify using Gtk; at the beginning of the file:

    Are you missing Gtk using directive?

    And do not forget to check that the necessary assemblies of the Gtk engine are connected to the project.

    Or use the full class names and replace DialogFlags with Gtk.DialogFlags , etc.