Methods returning multiple values
Methods - Extract multiple elements
Take() method
List<int> ints = new List<int> { 1, 2, 4, 8, 4, 2, 1 };
IEnumerable<int> result = ints.Take(3);Skip() method
List<int> ints = new List<int> { 1, 2, 4, 8, 4, 2, 1 };
IEnumerable<int> result = ints.Skip(3);Distinct() method
List<int> ints = new List<int> { 1, 2, 4, 8, 4, 2, 1 };
IEnumerable<int> result = ints.Distinct();Last updated