23
1
using System;
2
3
public class Program
4
{
5
public static void Main()
6
{
7
int age = 42;
8
9
switch (age) {
10
case 16:
11
Console.WriteLine("Muda");
12
break;
13
14
case 42:
15
Console.WriteLine("Remaja");
16
break;
17
18
case 70:
19
Console.WriteLine("Dewasa");
20
break;
21
}
22
}
23
}
Cached Result
Enter an integer: Process terminated. whats up
at System.Environment.FailFast(System.Runtime.CompilerServices.StackCrawlMarkHandle, System.String, System.Runtime.CompilerServices.ObjectHandleOnStack, System.String)
at System.Environment.FailFast(System.Threading.StackCrawlMark ByRef, System.String, System.Exception, System.String)
at System.Environment.FailFast(System.String)
at LISTING_1_79_The_finally_block.Program.Main(System.String[])
Command terminated by signal 6
at System.Environment.FailFast(System.Runtime.CompilerServices.StackCrawlMarkHandle, System.String, System.Runtime.CompilerServices.ObjectHandleOnStack, System.String)
at System.Environment.FailFast(System.Threading.StackCrawlMark ByRef, System.String, System.Exception, System.String)
at System.Environment.FailFast(System.String)
at LISTING_1_79_The_finally_block.Program.Main(System.String[])
Command terminated by signal 6