static void Main(string[] args) { Win32API kernel32 = new Win32API("kernel32.dll"); BeepDelegate Beep = kernel32.Function<BeepDelegate>("Beep"); Beep(440,500); kernel32.Dispose(); }