fork(1) download
  1. using System;
  2.  
  3. public class Test
  4. {
  5. public static void Main()
  6. {
  7. int x = 10;
  8. {
  9. int x = 20;
  10. Console.WriteLine(x);
  11. }
  12. Console.WriteLine(x);
  13. }
  14. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cs(9,21): error CS0136: A local variable named `x' cannot be declared in this scope because it would give a different meaning to `x', which is already used in a `parent or current' scope to denote something else
Compilation failed: 1 error(s), 0 warnings
stdout
Standard output is empty