fork download
  1. using System;
  2. using System.Linq;
  3.  
  4. public class Test
  5. {
  6. public static void Main()
  7. {
  8. var list = new List<string>() { "1", "2", "3" };
  9. foreach (var i in list.Distinct())
  10. Console.WriteLine(i);
  11. }
  12. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cs(8,24): error CS0246: The type or namespace name `List' could not be found. Are you missing a using directive or an assembly reference?
prog.cs(8,9): error CS0825: The contextual keyword `var' may only appear within a local variable declaration
prog.cs(9,27): error CS0841: A local variable `list' cannot be used before it is declared
Compilation failed: 3 error(s), 0 warnings
stdout
Standard output is empty