Take

suggest change

This method takes the first n elements from an enumerable.

var numbers = new[] {1,2,3,4,5};

var threeFirstNumbers = numbers.Take(3);
Console.WriteLine(string.Join(",", threeFirstNumbers.ToArray()));

//1,2,3

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:



Table Of Contents