fork download
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4.  
  5. public class Test
  6. {
  7. public static void Main()
  8. {
  9. IEnumerable<string> stream = Enumerable.Concat(new[] {"A"}, new[] {"B"});
  10. string a = stream.FirstOrDefault();
  11. string b = stream.FirstOrDefault();
  12. Console.WriteLine(a);
  13. Console.WriteLine(b);
  14. }
  15. }
Success #stdin #stdout 0.03s 15496KB
stdin
Standard input is empty
stdout
A
A