Windows Phone Developers

Tuesday, December 16, 2008

Beep in C# Console Application

How to Alert the user in C# console application

You can use “\a” to alert the user with the system beep sound. The following example alerts the user for input

private static void KeywordExample()

{

Console.Write("\a Your name please" );

string @MyString = Console.ReadLine();

Console.Write(@MyString);

}

Digg Technorati Delicious StumbleUpon Reddit BlinkList Furl Mixx Facebook Google Bookmark Yahoo
ma.gnolia squidoo newsvine live netscape tailrank mister-wong blogmarks slashdot spurl StumbleUpon

1 comment:

  1. Well thx a lot for that post :)
    I mean I program a bit in #C...and have obviously used Console.Write()/Console.Writeline() tons of time..but did not know that one could trigger the beep sound by using Console.Write("\a")....thx again.

    ReplyDelete