C# Console Application - Odd behaviour - char '\a'
- by KHT
After extensive debugging of an application, I noticed the console window would hang when searching text for the char '\a'. The goal is to strip out characters from a file.
The console window would always hang upon exiting the program, and it would make it to the last statement of main. I removed the '\a' from the switch statement and the console application does not hang anymore. Any idea why? I still need to strip out the char '\a', but cannot get the application to work without hanging.
switch (c)
{
case '\t': //Horizontal Tab
case '\v': //Vertical Tab
case '\n': //Newline
case '\f': //Form feed
case '\r': //carriage return
case '\b': //Backspace
case '\x7f': //delete character
case '\x99': //TM Trademark
case '\a': //Bell Alert **REMOVED THIS**
return true;
}