.NET application crashed

[BeginUltra]
private static void Main(string[] args)
{
	for (;;)
	{
		int a;
		switch (a = Console.Read())
		{
		case 49:
			Console.WriteLine("1");
			break;
		case 50:
			Console.WriteLine("2");
			break;
		case 51:
			Console.WriteLine("3");
			break;
		default:
			Console.WriteLine("s " + a.ToString());
			break;
		}
		Console.WriteLine("ok");
		Console.WriteLine();
	}
}

Code like this will cause crash.
ConsoleApp1.zip (6.55 KB)

Enter some characters and app crashes.

Please try the 1042 build:
http://vmpsoft.com/files/VMProtectDemo.exe