using System; public class Test{ public static void Main() { int x = 1; switch (x) { case 1: break; case 1: break; } }}
Standard input is empty
prog.cs(12,7): error CS0152: The label `case 1:' already occurs in this switch statement prog.cs(11,7): (Location of the symbol related to previous error) Compilation failed: 1 error(s), 0 warnings
Standard output is empty
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!