New to Telerik UI for BlazorStart a free 30-day trial

Extension methods for working with enumerable collections.

Definition

Namespace:Telerik.DataSource.Extensions

Assembly:Telerik.DataSource.dll

Syntax:

C#
public static class EnumerableExtensions

Inheritance: objectEnumerableExtensions

Methods

Makes a generic enumerable collection from the provided collection

C#
public static IEnumerable AsGenericEnumerable(this IEnumerable source)
Parameters:sourceIEnumerableReturns:

IEnumerable

Invokes an action for each item of the collection

C#
public static void Each<T>(this IEnumerable<T> instance, Action<T, int> action)
Parameters:instanceIEnumerable<T>

the collection that will be looped

actionAction<T, int>

the action that will be called for each item in the collection

Executes the provided delegate for each item.

C#
public static void Each<T>(this IEnumerable<T> instance, Action<T> action)
Parameters:instanceIEnumerable<T>

The instance.

actionAction<T>

The action to be applied.

Returns the index at which an element is met in a collection. Returns -1 if the element is not in the collection.

C#
public static int IndexOf(this IEnumerable source, object item)
Parameters:sourceIEnumerableitemobjectReturns:

int

C#
public static IEnumerable<TSource> SelectRecursive<TSource>(this IEnumerable<TSource> source, Func<TSource, IEnumerable<TSource>> recursiveSelector)
Parameters:sourceIEnumerable<TSource>recursiveSelectorFunc<TSource, IEnumerable<TSource>>Returns:

IEnumerable<TSource>

Creates a read only collection from the provided source.

C#
public static ReadOnlyCollection<T> ToReadOnlyCollection<T>(this IEnumerable<T> sequence)
Parameters:sequenceIEnumerable<T>Returns:

ReadOnlyCollection<T>