fork download
  1. using System;
  2.  
  3. public class Test
  4. {
  5. public static void Main()
  6. {
  7. Console.WriteLine(f(true));
  8. Console.WriteLine(f(false));
  9. }
  10. private static string f(bool arg)
  11. {
  12. switch (arg)
  13. {
  14. case true: return "true";
  15. case false: return "false";
  16. }
  17. }
  18.  
  19. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cs(10,31): error CS0161: `Test.f(bool)': not all code paths return a value
Compilation failed: 1 error(s), 0 warnings
stdout
Standard output is empty