Method FastCast
FastCast<T>(IEnumerable)
Casts the elements of a non-generic IEnumerable to the specified type.
public static IEnumerable<T> FastCast<T>(this IEnumerable source) where T : class
Parameters
source
IEnumerableThe non-generic IEnumerable to cast.
Returns
- IEnumerable<T>
An IEnumerable<T> that contains the casted elements.
Type Parameters
T
The type to cast the elements to.