fork(11) download
  1. using System;
  2. using System.Collections.Generic;
  3.  
  4. namespace ProgramConsole
  5. {
  6. class Program
  7. {
  8. static void Main(string[] args)
  9. {
  10. List<int> list = new List<int>(){1, 2, 3, 4, 5};
  11. if(!list.Contains(6))
  12. list.Add(6);
  13. foreach (var i in list)
  14. {
  15. Console.WriteLine(i);
  16. }
  17. }
  18. }
  19. }
Success #stdin #stdout 0.04s 33984KB
stdin
Standard input is empty
stdout
1
2
3
4
5
6