using Gtk; class Program { static void Main() { Application.Init(); var window = new Window("My App"); var button = new Button("Click me"); button.Clicked += (sender, args) => { MessageDialog md = new MessageDialog(window, DialogFlags.Modal, MessageType.Info, ButtonsType.Ok, "Button clicked!"); md.Run(); md.Destroy(); }; window.Add(button); window.ShowAll(); Application.Run(); } }In this example, we create a new window and a button with the label "Click me". We then attach an event handler to the button's Clicked event that creates and shows a new MessageDialog with the text "Button clicked!". Finally, we add the button to the window and show everything. This example uses the Gtk# package, which is a GTK+ binding for C#. It provides a set of classes that mirror the functionality of the GTK+ library, allowing C# developers to create GUI applications that look and feel like native GTK+ applications.