Pick the First Few Elements in an Array in C#

Using the Take operator, we can pick the first few elements of an array with a simple statement like this:

int n = 3;var firstThreeStates = states.Take(n);
Share the Post:
Share on facebook
Share on twitter
Share on linkedin

Related Posts