Using C# you can generate a simple beep signal from a computer. This can be achieved using the following console application code:

using System;
namespace ConsoleApplication3
{
    class Program
    {
        static void Main(string[] args)
        {
            Console.Beep(440, 1000);
        }
    }
}

When you start the program you will hear the sound lasting one second. We use function “Beep”. The first parameter is the frequency of the signal to be reproduced (440 Hz), and the second is the duration (1000 ms).

Was this post helpful?