Click or drag to resize
ExtensionMethodsCastCovariantTFrom, TTo Method
Casts enumerable of TFrom to enumerable of TTo on platforms where covariance is not supported.

Namespace: System.Collections.Generic
Assembly: Telerik.WinControls.RichTextEditor (in Telerik.WinControls.RichTextEditor.dll) Version: 2018.3.1016.40 (2018.3.1016.40)
public static IEnumerable<TTo> CastCovariant<TFrom, TTo>(
	this IEnumerable<TFrom> elements
where TFrom : class, TTo


Type: System.Collections.GenericIEnumerableTFrom

Type Parameters


Return Value

Type: IEnumerableTTo

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type IEnumerableTFrom. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also