DotNext by Roman Sakno

<PackageReference Include="DotNext" Version="2.12.0" />

 List

public static class List
Provides various extensions for IList<T> interface.
public static class Indexer<T>

Provides strongly-typed access to list indexer.

public static ReadOnlyListView<TInput, TOutput> Convert<TInput, TOutput>(this IReadOnlyList<TInput> list, ref ValueFunc converter)

Returns lazily converted read-only list.

public static ReadOnlyListView<TInput, TOutput> Convert<TInput, TOutput>(this IReadOnlyList<TInput> list, Converter<TInput, TOutput> converter)

Returns lazily converted read-only list.

public static Func<int, T> IndexerGetter<T>(this IReadOnlyList<T> list)

Returns get_Item as delegate attached to the list instance.

public static Func<int, T> IndexerGetter<T>(this IList<T> list)

Returns get_Item as delegate attached to the list instance.

public static Action<int, T> IndexerSetter<T>(this IList<T> list)

Returns set_Item as delegate attached to the list instance.

public static void Insert<T>(this IList<T> list, Index index, T item)

Inserts an item to the list at the specified index.

public static int InsertOrdered<T>(this IList<T> list, T item, ref ValueFunc comparer)

Inserts the item into sorted list.

public static int InsertOrdered<T>(this IList<T> list, T item, Comparison<T> comparer)

Inserts the item into sorted list.

public static void RemoveAt<T>(this IList<T> list, Index index)

Removes the item at the specifie index.

public static void RemoveRange<T>(this List<T> list, Range range)

Removes a range of elements from list.

public static IReadOnlyList<T> Singleton<T>(T item)

Constructs read-only list with single item in it.

public static ListSegment<T> Slice<T>(this IList<T> list, Range range)

Returns slice of the list.

public static TOutput[] ToArray<TInput, TOutput>(this IList<TInput> input, ref ValueFunc mapper)

Converts list into array and perform mapping for each element.

public static TOutput[] ToArray<TInput, TOutput>(this IList<TInput> input, Converter<TInput, TOutput> mapper)

Converts list into array and perform mapping for each element.

public static TOutput[] ToArray<TInput, TOutput>(this IList<TInput> input, ref ValueFunc mapper)

Converts list into array and perform mapping for each element.

public static TOutput[] ToArray<TInput, TOutput>(this IList<TInput> input, Func<int, TInput, TOutput> mapper)

Converts list into array and perform mapping for each element.