fork download
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.IO;
  6.  
  7. namespace ConsoleApplication2
  8. {
  9. class Program
  10. {
  11. static void Main(string[] args)
  12. {
  13. using (StreamReader sr = new StreamReader(@"inputfile.txt"))
  14. {
  15. var tr = (sr as TextReader);
  16. var ss = new List<string>();
  17. while (!sr.EndOfStream)
  18. {
  19. var s = tr.ReadLine();
  20. if (!ss.Contains(s))
  21. {
  22. ss.Add(s);
  23. }
  24. }
  25.  
  26. ss.ForEach(s => Console.WriteLine(s));
  27.  
  28. }
  29. //Console.ReadLine();
  30. }
  31. }
  32. }
  33.  
Runtime error #stdin #stdout 0.03s 39608KB
stdin
Standard input is empty
stdout
Standard output is empty