You can run it in a separate thread.
new Thread(() => Console.Beep()).Start();
I woke this morning to find flurry of comments on this answer. So I thought I would chime in with some other ideas.
The above can also be achieved running the thread on the Thread Pool, by using the following.
Action beep = Console.Beep;
beep.BeginInvoke((a) => { beep.EndInvoke(a); }, null);
The important thing in the above code is to call EndInvoke on your delegate if you use BeginInvoke otherwise you will experience memory leaks.
From MSDN:Important: Always call EndInvoke to complete your asynchronous call.
http://msdn.microsoft.com/en-us/library/2e08f6yc(VS.80).aspx
Alternatively, you can use the dedicated Beep thread to have beeps run in the background when on demand without creating a new thread everytime or using the thread pool (see Simon Chadwick's comment). As a simple example, you could have the following. Notice that I pass 1 as the maxStackSize, this will ensure that the minimum (not 1, minimum) stack space is committed for this thread, see MSDN for more detail on this.
class BackgroundBeep
{
static Thread _beepThread;
static AutoResetEvent _signalBeep;
static BackgroundBeep()
{
_signalBeep = new AutoResetEvent(false);
_beepThread = new Thread(() =>
{
for (; ; )
{
_signalBeep.WaitOne();
Console.Beep();
}
}, 1);
_beepThread.IsBackground = true;
_beepThread.Start();
}
public static void Beep()
{
_signalBeep.Set();
}
}
With this, all you need to do to run a backround beep at anytime with out creating new threads is make the following call
BackgroundBeep.Beep();