fork download
  1. using System;
  2.  
  3. public class Test
  4. {
  5. public static void Main()
  6. {
  7. try
  8. {
  9. bool condition = true;
  10. bool isCurrent;
  11. if(condition)
  12. isCurrent = true;
  13. if(isCurrent)
  14. Console.WriteLine("You were right");
  15. }
  16. catch
  17. {
  18. Console.WriteLine("Nope, you were misremembering probably.");
  19. }
  20. }
  21. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cs(13,7): error CS0165: Use of unassigned local variable `isCurrent'
Compilation failed: 1 error(s), 0 warnings
stdout
Standard output is empty