Class CollectionExtensions
- Namespace
- Icy.Data
- Assembly
- IcyUI.dll
Provides extension methods for working with collections.
public static class CollectionExtensions
- Inheritance
-
CollectionExtensions
- Inherited Members
Methods
AsCollection<TSource, TTarget>(IReadOnlyCollection<TSource>, Func<TSource, TTarget>)
Projects the elements of an IReadOnlyCollection<T> into a new IReadOnlyCollection<T> using a specified projection function.
public static IReadOnlyCollection<TTarget> AsCollection<TSource, TTarget>(this IReadOnlyCollection<TSource> values, Func<TSource, TTarget> projection)
Parameters
valuesIReadOnlyCollection<TSource>The source collection of elements to be projected.
projectionFunc<TSource, TTarget>A function that defines how to project each element of type
TSourceinto an element of typeTTarget.
Returns
- IReadOnlyCollection<TTarget>
A new IReadOnlyCollection<T> containing the projected elements.
Type Parameters
TSourceThe type of the elements in the source collection.
TTargetThe type of the elements in the target collection.