How to add basic sounds to a .NET console application:
Today we will look how to add basic sounds to our .Net Console application
Create a Console Application:
The Console object has a Beep method which has a parameterless version:
Console.Beep();
It plays a short beep sound. If you’re not satisfied with it you can go for the overloaded Beep method that accepts a frequency in hertz and a duration in milliseconds.
The lower the frequency value the deeper the sound:
Console.Beep(100, 5000);
That sounds like an organ.
Console.Beep(10000, 5000);
That on the other hand just sounds awful.
0 comments:
Post a Comment