When writing a program at the C #, beep (), when you want to pop up the prompt window, find that there is no Beep () function. I checked it online and found this. The support of multi-coal bodies is very weak in FCL.
Solution 1: You can call the Win32 API:
[System.Runtime.InteropServices.dllimport ("User32.dll")] public static extern bool messagebeep (uint utype); messagebeep (1);
Workaround 2: Calling Beep in Microsoft.viualBase ():
1. First introduced the namespace: USING Microsoft.VisualBasic;
2. Call: interaction.beep ();
Pay attention to the Microsoft.visualBasic.dll assembly when compiling, otherwise compile cannot pass.
In addition, if it is a Console application, you can use console.writeline ("/ a") to instead of Beep ().