MessageBox from user32.dll
using System; using System.Runtime.InteropServices; public class Starter { public static void Main() { string caption = "Visual C# 2005"; string text = "Hello, world!"; API.ShowMessage(0, text, caption, 0); } } public class API { [DllImport("user32.dll", EntryPoint = "MessageBox")] public static extern int ShowMessage(int hWnd, string text, string caption, uint type); }