System::Array::ConvertAll method

Array::ConvertAll(ArrayPtr<InputType>, Converter<InputType, OutputType>) method

Constructs a new Array object and fills it with elements of the specified array converted to OutputType type using the specified converter delegate.

template<typename InputType,typename OutputType> static ArrayPtr<OutputType> System::Array<T>::ConvertAll(ArrayPtr<InputType> input_array, Converter<InputType, OutputType> converter)
ParameterDescription
InputTypeThe type of elements of input array
OutputTypeThe type of elements of the resulting array
ParameterTypeDescription
input_arrayArrayPtr<InputType>An Array object
converterConverter<InputType, OutputType>A Converter object used to convert each element of the input array to equivalent values of OutputType type

ReturnValue

A new array containing values of OutputType type equivalent to the values of input_array

See Also

Array::ConvertAll(ArrayPtr<InputType>, std::function<OutputType(InputType)>) method

Constructs a new Array object and fills it with elements of the specified array converted to OutputType type using the specified converter function object.

template<typename InputType,typename OutputType> static ArrayPtr<OutputType> System::Array<T>::ConvertAll(ArrayPtr<InputType> input_array, std::function<OutputType(InputType)> converter)
ParameterDescription
InputTypeThe type of elements of input array
OutputTypeThe type of elements of the resulting array
ParameterTypeDescription
input_arrayArrayPtr<InputType>An Array object
converterstd::function<OutputType(InputType)>A function object used to convert each element of the input array to equivalent values of OutputType type

ReturnValue

A new array containing values of OutputType type equivalent to the values of input_array

See Also