LINQ_Average()

IEnumerable::LINQ_Average() method

Computes the average of a sequence of numeric values.

Source System::Collections::Generic::IEnumerable<Source>::LINQ_Average()

Return Value

The average of the values in the sequence.

IEnumerable::LINQ_Average(const Func<T, ResultType>&) method

Computes the average of a sequence of values that are obtained by invoking a transform function on each element of the input sequence.

template<typename ResultType> ResultType System::Collections::Generic::IEnumerable<T>::LINQ_Average(const Func<T, ResultType> &selector)

Template parameters

ParameterDescription
ResultTypeThe type of the value returned by selector.

Arguments

ParameterTypeDescription
selectorconst Func<T, ResultType>&A transform function to apply to each element.

Return Value

The average of the projected values.

IEnumerable::LINQ_Average(const Func<Source, ResultType>&) method

template<typename ResultType> ResultType System::Collections::Generic::IEnumerable<T>::LINQ_Average(const Func<Source, ResultType> &selector)

See Also