AlgorithmsConvertTSource, TDest Method |
Convert a collection of items by applying a delegate to each item in the collection. The resulting collection
contains the result of applying converter to each item in sourceCollection, in
order.
Namespace: X3Platform.CollectionsAssembly: X3Platform.Support (in X3Platform.Support.dll) Version: 1.0.0.0 (2.0.0.0)
Syntaxpublic static IEnumerable<TDest> Convert<TSource, TDest>(
IEnumerable<TSource> sourceCollection,
Converter<TSource, TDest> converter
)
public:
generic<typename TSource, typename TDest>
static IEnumerable<TDest>^ Convert(
IEnumerable<TSource>^ sourceCollection,
Converter<TSource, TDest>^ converter
)
Parameters
- sourceCollection
- Type: System.Collections.GenericIEnumerableTSource
The collection of item being converted. - converter
- Type: SystemConverterTSource, TDest
A delegate to the method to call, passing each item in sourceCollection.
Type Parameters
- TSource
- The type of items in the collection to convert.
- TDest
- The type each item is being converted to.
Return Value
Type:
IEnumerableTDestThe resulting collection from applying
converter to each item in
sourceCollection, in
order.
Exceptions
See Also