Well, that will break a lot of nonsense (and hear a lot if you do not mask the symbol 7, which is a bell), but it never ceases to answer for me.
It will depend on how your console handles control characters, though - which console do you use, on which operating system and in which language?
Also, why do you want to send non-printable characters to the console? If you save your loop in ASCII (32-126), what will happen? For instance:
using System; class Test { static void Main(string[] args) { int i=32; while (true) { Console.Write((char)i); i++; if (i == 127) { i = 32; } } } }
Does the same behavior persist?
You mentioned the debugger β do you get the same behavior if you go beyond the debugger? (I only tested from the command line so far.)
source share