CollectionExtensions
Namespace: XPlat.Extensions
Defines a collection of extensions for enumerable objects.
Supported platforms
Platform
Version
.NET Standard
2.0
Xamarin.Android
9.0
Xamarin.iOS
1.0
UWP
10.0.16299
Static Methods
Take(this List, int, int)
Takes a number of elements from the specified list from the specified starting index.
Parameters
list (List)
The list to take items from.
startingIndex (int)
The index to start at in the list.
takeCount (int)
The number of items to take from the starting index of the list.
Returns
Returns a collection of T items.
Take(this IReadOnlyList, int, int)
Takes a number of elements from the specified readonly list from the specified starting index.
Example
This example shows how the Take method can be used to take a range of items from a collection.
Parameters
list (List)
The list to take items from.
startingIndex (int)
The index to start at in the list.
takeCount (int)
The number of items to take from the starting index of the list.
Returns
Returns a collection of T items.
Last updated