Search code examples
.netconsoleasciibeep

When print ASCII 0x07 character on console in .NET this causes system beep


I write such code in VB.NET:

Console.WriteLine(ChrW(7))

And this is causes the system beep. What is this? And how to off this behavior?


Solution

  • What is this?

    The BEL character/code: https://en.wikipedia.org/wiki/Bell_character

    And how to off this behavior?

    Don't send character 7 to the console when you don't want it to beep.