Mono Class Library: System.Array Overview | Members

System.Array.ConvertAll<TInput,TOutput> Method

Converts an array of one type to an array of another type. [Edit]

public static TOutput[] ConvertAll<TInput, TOutput> (TInput[] array, Converter<TInput, TOutput> converter)

Type Parameters

TInput
Documentation for this section has not yet been entered. [Edit]
TOutput
Documentation for this section has not yet been entered. [Edit]

Parameters

array
The one-dimensional array to convert. [Edit]
converter
A Converter<T, U> that converts each element from one type to another type. [Edit]

Returns

A new array of the target type containing the converted elements from array. [Edit]

Exceptions

TypeReason
ArgumentNullExceptionarray is null or converter is null. [Edit]

Remarks

The Converter<T, U> is a delegate that converts an array element to the target type. The elements of array are individually passed to this converter, and the converted elements are saved in the new array. The source array remains unchanged. [Edit]

Requirements

Namespace: System
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 2.0.0.0
Since: .NET 2.0