fork(4) 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. List<int> yourlist = new List<int>(){1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15};
  10. IEnumerable<int> newlist = yourlist.Skip(2).Take(3);
  11.  
  12. foreach(var i in newlist)
  13. Console.WriteLine(i);
  14. }
  15. }
Success #stdin #stdout 0.03s 33760KB
stdin
Standard input is empty
stdout
3
4
5