Aave
Aave

Reputation: 568

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?

Upvotes: 1

Views: 486

Answers (2)

Tom Blodget
Tom Blodget

Reputation: 20782

If you never want beeps from the console, stop or disable the beep service.

For example,

net stop beep

in an Administrative command prompt.

Upvotes: 1

Marc Gravell
Marc Gravell

Reputation: 1062780

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.

Upvotes: 4

Related Questions