fork download
  1. using System;
  2. using System.Linq;
  3. using System.Collections.Generic;
  4.  
  5. static class Test
  6. {
  7. public static void Main()
  8. {
  9. int[] art = new int[] {11, 2, 8, 15};
  10. int name;
  11. name = Convert.ToInt32(Console.ReadLine());
  12. // int k = art.indexOf(name);
  13. foreach (int name in art)
  14. {
  15. Console.WriteLine(name);
  16. }
  17.  
  18. // var hash = new HashSet<int>(art);
  19. //if (hash.Contains(art))
  20. //{
  21. // Console.WriteLine(int.Format("Число '" + name + "' содержится в массиве"));
  22. // //...
  23. //}
  24. }
  25. }
Compilation error #stdin compilation error #stdout 0.03s 15988KB
stdin
10
compilation info
prog.cs(13,19): error CS0136: A local variable named `name' cannot be declared in this scope because it would give a different meaning to `name', 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