Click or drag to resize

EnumerableExtensionToCollectionT Method

Creates a Collection{T} from an IEnumerable{T}.

Namespace:  TB.ComponentModel
Assembly:  UniversalTypeConverter (in UniversalTypeConverter.dll) Version: 2.0.0
Syntax
C#
public static Collection<T> ToCollection<T>(
	this IEnumerable<T> source
)

Parameters

source
Type: System.Collections.GenericIEnumerableT
The IEnumerable{T} to create a Collection{T} from.

Type Parameters

T
The type of the elements of source.

Return Value

Type: CollectionT
A Collection{T} that contains elements from the input sequence.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type IEnumerableT. 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