Page 1 of 1

.NET application crashed

Posted: Wed Aug 14, 2019 2:17 am
by wwh1004

Code: Select all

[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 KiB) Downloaded 345 times

Re: .NET application crashed

Posted: Fri Aug 16, 2019 4:44 am
by wwh1004
Enter some characters and app crashes.
Snipaste_2019-08-16_12-42-52.png
Snipaste_2019-08-16_12-42-52.png (38.73 KiB) Viewed 3153 times

Re: .NET application crashed

Posted: Fri Aug 16, 2019 12:13 pm
by Admin