EnumerableExtensions
Extension methods for IEnumerable.
Definition
Namespace:Kendo.Mvc.Extensions
Assembly:Kendo.Mvc.dll
Syntax:
public static class EnumerableExtensions
Inheritance: objectEnumerableExtensions
Inherited Members
Methods
Converts a non-generic IEnumerable to a generic IEnumerable.
public static IEnumerable AsGenericEnumerable(this IEnumerable source)
The source collection.
Returns:A generic IEnumerable.
Executes the provided action for each item with its index.
public static void Each<T>(this IEnumerable<T> instance, Action<T, int> action)
The collection instance.
actionAction<T, int>The action to be applied to each item and its index.
Executes the provided delegate for each item.
public static void Each<T>(this IEnumerable<T> instance, Action<T> action)
The instance.
actionAction<T>The action to be applied.
Returns the index of the specified item in the collection.
public static int IndexOf(this IEnumerable source, object item)
The source collection.
itemobjectThe item to find.
Returns:The zero-based index of the item, or -1 if not found.
Recursively selects elements from a hierarchical collection.
public static IEnumerable<TSource> SelectRecursive<TSource>(this IEnumerable<TSource> source, Func<TSource, IEnumerable<TSource>> recursiveSelector)
IEnumerable<TSource>
A flattened collection of all elements.
Converts the sequence to a ReadOnlyCollection.
public static ReadOnlyCollection<T> ToReadOnlyCollection<T>(this IEnumerable<T> sequence)
The sequence to convert.
Returns:A ReadOnlyCollection containing the elements.