fork download
  1. using System;
  2.  
  3. public class Test
  4. {
  5. static void Main(string[] args)
  6. {
  7. List<int> list = new List<int>();
  8. int a = 1;
  9. while (list.Count() < 3)
  10. {
  11. a++;
  12. list.Add(a);
  13. Console.Write(a);
  14. }
  15. Console.Write(list.IndexOf(a));
  16. Console.ReadKey();
  17. }
  18. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cs(7,13): error CS0246: The type or namespace name `List' could not be found. Are you missing `System.Collections.Generic' using directive?
prog.cs(9,20): error CS0841: A local variable `list' cannot be used before it is declared
prog.cs(12,17): error CS0841: A local variable `list' cannot be used before it is declared
prog.cs(15,27): error CS0841: A local variable `list' cannot be used before it is declared
Compilation failed: 4 error(s), 0 warnings
stdout
Standard output is empty