Editare

Partajați prin


ParallelEnumerable.Average Method

Definition

Computes in parallel the average of a sequence of values.

Overloads

Average(ParallelQuery<Single>)

Computes in parallel the average of a sequence of values.

Average(ParallelQuery<Nullable<Int64>>)

Computes in parallel the average of a sequence of values.

Average(ParallelQuery<Nullable<Int32>>)

Computes in parallel the average of a sequence of values.

Average(ParallelQuery<Nullable<Double>>)

Computes in parallel the average of a sequence of values.

Average(ParallelQuery<Nullable<Single>>)

Computes in parallel the average of a sequence of values.

Average(ParallelQuery<Int64>)

Computes in parallel the average of a sequence of values.

Average(ParallelQuery<Int32>)

Computes in parallel the average of a sequence of values.

Average(ParallelQuery<Double>)

Computes in parallel the average of a sequence of values.

Average(ParallelQuery<Decimal>)

Computes in parallel the average of a sequence of values.

Average(ParallelQuery<Nullable<Decimal>>)

Computes in parallel the average of a sequence of values.

Average<TSource>(ParallelQuery<TSource>, Func<TSource,Single>)

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

Average<TSource>(ParallelQuery<TSource>, Func<TSource,Nullable<Int64>>)

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

Average<TSource>(ParallelQuery<TSource>, Func<TSource,Nullable<Int32>>)

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

Average<TSource>(ParallelQuery<TSource>, Func<TSource,Nullable<Double>>)

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

Average<TSource>(ParallelQuery<TSource>, Func<TSource,Nullable<Single>>)

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

Average<TSource>(ParallelQuery<TSource>, Func<TSource,Int64>)

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

Average<TSource>(ParallelQuery<TSource>, Func<TSource,Int32>)

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

Average<TSource>(ParallelQuery<TSource>, Func<TSource,Double>)

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

Average<TSource>(ParallelQuery<TSource>, Func<TSource,Decimal>)

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

Average<TSource>(ParallelQuery<TSource>, Func<TSource,Nullable<Decimal>>)

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

Average(ParallelQuery<Single>)

Source:
ParallelEnumerable.cs
Source:
ParallelEnumerable.cs
Source:
ParallelEnumerable.cs

Computes in parallel the average of a sequence of values.

public:
[System::Runtime::CompilerServices::Extension]
 static float Average(System::Linq::ParallelQuery<float> ^ source);
public static float Average (this System.Linq.ParallelQuery<float> source);
static member Average : System.Linq.ParallelQuery<single> -> single
<Extension()>
Public Function Average (source As ParallelQuery(Of Single)) As Single

Parameters

source
ParallelQuery<Single>

A sequence of values that are used to calculate an average.

Returns

The average of the sequence of values.

Exceptions

source is a null reference (Nothing in Visual Basic).

One or more exceptions occurred during the evaluation of the query.

source contains no elements.

See also

Applies to

Average(ParallelQuery<Nullable<Int64>>)

Source:
ParallelEnumerable.cs
Source:
ParallelEnumerable.cs
Source:
ParallelEnumerable.cs

Computes in parallel the average of a sequence of values.

public:
[System::Runtime::CompilerServices::Extension]
 static Nullable<double> Average(System::Linq::ParallelQuery<Nullable<long>> ^ source);
public static double? Average (this System.Linq.ParallelQuery<long?> source);
static member Average : System.Linq.ParallelQuery<Nullable<int64>> -> Nullable<double>
<Extension()>
Public Function Average (source As ParallelQuery(Of Nullable(Of Long))) As Nullable(Of Double)

Parameters

source
ParallelQuery<Nullable<Int64>>

A sequence of values that are used to calculate an average.

Returns

The average of the sequence of values.

Exceptions

source is a null reference (Nothing in Visual Basic).

The sum or count of the elements in the sequence is larger than Int32.MaxValue. -or- One or more exceptions occurred during the evaluation of the query.

source contains no elements.

See also

Applies to

Average(ParallelQuery<Nullable<Int32>>)

Source:
ParallelEnumerable.cs
Source:
ParallelEnumerable.cs
Source:
ParallelEnumerable.cs

Computes in parallel the average of a sequence of values.

public:
[System::Runtime::CompilerServices::Extension]
 static Nullable<double> Average(System::Linq::ParallelQuery<Nullable<int>> ^ source);
public static double? Average (this System.Linq.ParallelQuery<int?> source);
static member Average : System.Linq.ParallelQuery<Nullable<int>> -> Nullable<double>
<Extension()>
Public Function Average (source As ParallelQuery(Of Nullable(Of Integer))) As Nullable(Of Double)

Parameters

source
ParallelQuery<Nullable<Int32>>

A sequence of values that are used to calculate an average.

Returns

The average of the sequence of values.

Exceptions

source is a null reference (Nothing in Visual Basic).

The sum or count of the elements in the sequence is larger than Int32.MaxValue. -or- One or more exceptions occurred during the evaluation of the query.

source contains no elements.

See also

Applies to

Average(ParallelQuery<Nullable<Double>>)

Source:
ParallelEnumerable.cs
Source:
ParallelEnumerable.cs
Source:
ParallelEnumerable.cs

Computes in parallel the average of a sequence of values.

public:
[System::Runtime::CompilerServices::Extension]
 static Nullable<double> Average(System::Linq::ParallelQuery<Nullable<double>> ^ source);
public static double? Average (this System.Linq.ParallelQuery<double?> source);
static member Average : System.Linq.ParallelQuery<Nullable<double>> -> Nullable<double>
<Extension()>
Public Function Average (source As ParallelQuery(Of Nullable(Of Double))) As Nullable(Of Double)

Parameters

source
ParallelQuery<Nullable<Double>>

The source sequence.

Returns

The average of the sequence of values.

Exceptions

source is null.

One or more exceptions occurred during the evaluation of the query.

source contains no elements.

See also

Applies to

Average(ParallelQuery<Nullable<Single>>)

Source:
ParallelEnumerable.cs
Source:
ParallelEnumerable.cs
Source:
ParallelEnumerable.cs

Computes in parallel the average of a sequence of values.

public:
[System::Runtime::CompilerServices::Extension]
 static Nullable<float> Average(System::Linq::ParallelQuery<Nullable<float>> ^ source);
public static float? Average (this System.Linq.ParallelQuery<float?> source);
static member Average : System.Linq.ParallelQuery<Nullable<single>> -> Nullable<single>
<Extension()>
Public Function Average (source As ParallelQuery(Of Nullable(Of Single))) As Nullable(Of Single)

Parameters

source
ParallelQuery<Nullable<Single>>

A sequence of values that are used to calculate an average.

Returns

The average of the sequence of values.

Exceptions

source is a null reference (Nothing in Visual Basic).

One or more exceptions occurred during the evaluation of the query.

source contains no elements.

See also

Applies to

Average(ParallelQuery<Int64>)

Source:
ParallelEnumerable.cs
Source:
ParallelEnumerable.cs
Source:
ParallelEnumerable.cs

Computes in parallel the average of a sequence of values.

public:
[System::Runtime::CompilerServices::Extension]
 static double Average(System::Linq::ParallelQuery<long> ^ source);
public static double Average (this System.Linq.ParallelQuery<long> source);
static member Average : System.Linq.ParallelQuery<int64> -> double
<Extension()>
Public Function Average (source As ParallelQuery(Of Long)) As Double

Parameters

source
ParallelQuery<Int64>

A sequence of values that are used to calculate an average.

Returns

The average of the sequence of values.

Exceptions

source is a null reference (Nothing in Visual Basic).

The sum or count of the elements in the sequence is larger than Int32.MaxValue. -or- One or more exceptions occurred during the evaluation of the query.

source contains no elements.

See also

Applies to

Average(ParallelQuery<Int32>)

Source:
ParallelEnumerable.cs
Source:
ParallelEnumerable.cs
Source:
ParallelEnumerable.cs

Computes in parallel the average of a sequence of values.

public:
[System::Runtime::CompilerServices::Extension]
 static double Average(System::Linq::ParallelQuery<int> ^ source);
public static double Average (this System.Linq.ParallelQuery<int> source);
static member Average : System.Linq.ParallelQuery<int> -> double
<Extension()>
Public Function Average (source As ParallelQuery(Of Integer)) As Double

Parameters

source
ParallelQuery<Int32>

A sequence of values that are used to calculate an average.

Returns

The average of the sequence of values.

Exceptions

source is a null reference (Nothing in Visual Basic).

The sum or count of the elements in the sequence is larger than Int32.MaxValue. -or- One or more exceptions occurred during the evaluation of the query.

source contains no elements.

See also

Applies to

Average(ParallelQuery<Double>)

Source:
ParallelEnumerable.cs
Source:
ParallelEnumerable.cs
Source:
ParallelEnumerable.cs

Computes in parallel the average of a sequence of values.

public:
[System::Runtime::CompilerServices::Extension]
 static double Average(System::Linq::ParallelQuery<double> ^ source);
public static double Average (this System.Linq.ParallelQuery<double> source);
static member Average : System.Linq.ParallelQuery<double> -> double
<Extension()>
Public Function Average (source As ParallelQuery(Of Double)) As Double

Parameters

source
ParallelQuery<Double>

A sequence of values that are used to calculate an average.

Returns

The average of the sequence of values.

Exceptions

source is a null reference (Nothing in Visual Basic).

One or more exceptions occurred during the evaluation of the query.

source contains no elements.

See also

Applies to

Average(ParallelQuery<Decimal>)

Source:
ParallelEnumerable.cs
Source:
ParallelEnumerable.cs
Source:
ParallelEnumerable.cs

Computes in parallel the average of a sequence of values.

public:
[System::Runtime::CompilerServices::Extension]
 static System::Decimal Average(System::Linq::ParallelQuery<System::Decimal> ^ source);
public static decimal Average (this System.Linq.ParallelQuery<decimal> source);
static member Average : System.Linq.ParallelQuery<decimal> -> decimal
<Extension()>
Public Function Average (source As ParallelQuery(Of Decimal)) As Decimal

Parameters

source
ParallelQuery<Decimal>

A sequence of values that are used to calculate an average.

Returns

The average of the sequence of values.

Exceptions

source is a null reference (Nothing in Visual Basic).

One or more exceptions occurred during the evaluation of the query.

source contains no elements.

See also

Applies to

Average(ParallelQuery<Nullable<Decimal>>)

Source:
ParallelEnumerable.cs
Source:
ParallelEnumerable.cs
Source:
ParallelEnumerable.cs

Computes in parallel the average of a sequence of values.

public:
[System::Runtime::CompilerServices::Extension]
 static Nullable<System::Decimal> Average(System::Linq::ParallelQuery<Nullable<System::Decimal>> ^ source);
public static decimal? Average (this System.Linq.ParallelQuery<decimal?> source);
static member Average : System.Linq.ParallelQuery<Nullable<decimal>> -> Nullable<decimal>
<Extension()>
Public Function Average (source As ParallelQuery(Of Nullable(Of Decimal))) As Nullable(Of Decimal)

Parameters

source
ParallelQuery<Nullable<Decimal>>

A sequence of values that are used to calculate an average.

Returns

The average of the sequence of values.

Exceptions

source is a null reference (Nothing in Visual Basic).

One or more exceptions occurred during the evaluation of the query.

source contains no elements.

See also

Applies to

Average<TSource>(ParallelQuery<TSource>, Func<TSource,Single>)

Source:
ParallelEnumerable.cs
Source:
ParallelEnumerable.cs
Source:
ParallelEnumerable.cs

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

public:
generic <typename TSource>
[System::Runtime::CompilerServices::Extension]
 static float Average(System::Linq::ParallelQuery<TSource> ^ source, Func<TSource, float> ^ selector);
public static float Average<TSource> (this System.Linq.ParallelQuery<TSource> source, Func<TSource,float> selector);
static member Average : System.Linq.ParallelQuery<'Source> * Func<'Source, single> -> single
<Extension()>
Public Function Average(Of TSource) (source As ParallelQuery(Of TSource), selector As Func(Of TSource, Single)) As Single

Type Parameters

TSource

The type of elements of source.

Parameters

source
ParallelQuery<TSource>

A sequence of values that are used to calculate an average.

selector
Func<TSource,Single>

A transform function to apply to each element.

Returns

The average of the sequence of values.

Exceptions

source or selector is a null reference (Nothing in Visual Basic).

One or more exceptions occurred during the evaluation of the query.

source contains no elements.

(Thrown as inner exception in an AggregateException). The selector function returns a value greater than MaxValue for the element type.

See also

Applies to

Average<TSource>(ParallelQuery<TSource>, Func<TSource,Nullable<Int64>>)

Source:
ParallelEnumerable.cs
Source:
ParallelEnumerable.cs
Source:
ParallelEnumerable.cs

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

public:
generic <typename TSource>
[System::Runtime::CompilerServices::Extension]
 static Nullable<double> Average(System::Linq::ParallelQuery<TSource> ^ source, Func<TSource, Nullable<long>> ^ selector);
public static double? Average<TSource> (this System.Linq.ParallelQuery<TSource> source, Func<TSource,long?> selector);
static member Average : System.Linq.ParallelQuery<'Source> * Func<'Source, Nullable<int64>> -> Nullable<double>
<Extension()>
Public Function Average(Of TSource) (source As ParallelQuery(Of TSource), selector As Func(Of TSource, Nullable(Of Long))) As Nullable(Of Double)

Type Parameters

TSource

The type of elements of source.

Parameters

source
ParallelQuery<TSource>

A sequence of values that are used to calculate an average.

selector
Func<TSource,Nullable<Int64>>

A transform function to apply to each element.

Returns

The average of the sequence of values.

Exceptions

source or selector is a null reference (Nothing in Visual Basic).

The sum or count of the elements in the sequence is larger than Int64.MaxValue. -or- One or more exceptions occurred during the evaluation of the query.

source contains no elements.

(Thrown as inner exception in an AggregateException). The selector function returns a value greater than MaxValue for the element type.

See also

Applies to

Average<TSource>(ParallelQuery<TSource>, Func<TSource,Nullable<Int32>>)

Source:
ParallelEnumerable.cs
Source:
ParallelEnumerable.cs
Source:
ParallelEnumerable.cs

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

public:
generic <typename TSource>
[System::Runtime::CompilerServices::Extension]
 static Nullable<double> Average(System::Linq::ParallelQuery<TSource> ^ source, Func<TSource, Nullable<int>> ^ selector);
public static double? Average<TSource> (this System.Linq.ParallelQuery<TSource> source, Func<TSource,int?> selector);
static member Average : System.Linq.ParallelQuery<'Source> * Func<'Source, Nullable<int>> -> Nullable<double>
<Extension()>
Public Function Average(Of TSource) (source As ParallelQuery(Of TSource), selector As Func(Of TSource, Nullable(Of Integer))) As Nullable(Of Double)

Type Parameters

TSource

The type of elements of source.

Parameters

source
ParallelQuery<TSource>

A sequence of values that are used to calculate an average.

selector
Func<TSource,Nullable<Int32>>

A transform function to apply to each element.

Returns

The average of the sequence of values.

Exceptions

source or selector is a null reference (Nothing in Visual Basic).

The sum or count of the elements in the sequence is larger than Int32.MaxValue. -or- One or more exceptions occurred during the evaluation of the query.

source contains no elements.

(Thrown as inner exception in an AggregateException). The selector function returns a value greater than MaxValue for the element type.

See also

Applies to

Average<TSource>(ParallelQuery<TSource>, Func<TSource,Nullable<Double>>)

Source:
ParallelEnumerable.cs
Source:
ParallelEnumerable.cs
Source:
ParallelEnumerable.cs

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

public:
generic <typename TSource>
[System::Runtime::CompilerServices::Extension]
 static Nullable<double> Average(System::Linq::ParallelQuery<TSource> ^ source, Func<TSource, Nullable<double>> ^ selector);
public static double? Average<TSource> (this System.Linq.ParallelQuery<TSource> source, Func<TSource,double?> selector);
static member Average : System.Linq.ParallelQuery<'Source> * Func<'Source, Nullable<double>> -> Nullable<double>
<Extension()>
Public Function Average(Of TSource) (source As ParallelQuery(Of TSource), selector As Func(Of TSource, Nullable(Of Double))) As Nullable(Of Double)

Type Parameters

TSource

The type of elements of source.

Parameters

source
ParallelQuery<TSource>

A sequence of values that are used to calculate an average.

selector
Func<TSource,Nullable<Double>>

A transform function to apply to each element.

Returns

The average of the sequence of values.

Exceptions

source or selector is a null reference (Nothing in Visual Basic).

One or more exceptions occurred during the evaluation of the query.

source contains no elements.

(Thrown as inner exception in an AggregateException). The selector function returns a value greater than MaxValue for the element type.

See also

Applies to

Average<TSource>(ParallelQuery<TSource>, Func<TSource,Nullable<Single>>)

Source:
ParallelEnumerable.cs
Source:
ParallelEnumerable.cs
Source:
ParallelEnumerable.cs

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

public:
generic <typename TSource>
[System::Runtime::CompilerServices::Extension]
 static Nullable<float> Average(System::Linq::ParallelQuery<TSource> ^ source, Func<TSource, Nullable<float>> ^ selector);
public static float? Average<TSource> (this System.Linq.ParallelQuery<TSource> source, Func<TSource,float?> selector);
static member Average : System.Linq.ParallelQuery<'Source> * Func<'Source, Nullable<single>> -> Nullable<single>
<Extension()>
Public Function Average(Of TSource) (source As ParallelQuery(Of TSource), selector As Func(Of TSource, Nullable(Of Single))) As Nullable(Of Single)

Type Parameters

TSource

The type of elements of source.

Parameters

source
ParallelQuery<TSource>

A sequence of values that are used to calculate an average.

selector
Func<TSource,Nullable<Single>>

A transform function to apply to each element.

Returns

The average of the sequence of values.

Exceptions

source or selector is a null reference (Nothing in Visual Basic).

One or more exceptions occurred during the evaluation of the query.

source contains no elements.

(Thrown as inner exception in an AggregateException). The selector function returns a value greater than MaxValue for the element type.

See also

Applies to

Average<TSource>(ParallelQuery<TSource>, Func<TSource,Int64>)

Source:
ParallelEnumerable.cs
Source:
ParallelEnumerable.cs
Source:
ParallelEnumerable.cs

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

public:
generic <typename TSource>
[System::Runtime::CompilerServices::Extension]
 static double Average(System::Linq::ParallelQuery<TSource> ^ source, Func<TSource, long> ^ selector);
public static double Average<TSource> (this System.Linq.ParallelQuery<TSource> source, Func<TSource,long> selector);
static member Average : System.Linq.ParallelQuery<'Source> * Func<'Source, int64> -> double
<Extension()>
Public Function Average(Of TSource) (source As ParallelQuery(Of TSource), selector As Func(Of TSource, Long)) As Double

Type Parameters

TSource

The type of elements of source.

Parameters

source
ParallelQuery<TSource>

A sequence of values that are used to calculate an average.

selector
Func<TSource,Int64>

A transform function to apply to each element.

Returns

The average of the sequence of values.

Exceptions

source or selector is a null reference (Nothing in Visual Basic).

The sum or count of the elements in the sequence is larger than Int32.MaxValue. -or- One or more exceptions occurred during the evaluation of the query.

source contains no elements.

(Thrown as inner exception in an AggregateException). The selector function returns a value greater than MaxValue for the element type.

See also

Applies to

Average<TSource>(ParallelQuery<TSource>, Func<TSource,Int32>)

Source:
ParallelEnumerable.cs
Source:
ParallelEnumerable.cs
Source:
ParallelEnumerable.cs

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

public:
generic <typename TSource>
[System::Runtime::CompilerServices::Extension]
 static double Average(System::Linq::ParallelQuery<TSource> ^ source, Func<TSource, int> ^ selector);
public static double Average<TSource> (this System.Linq.ParallelQuery<TSource> source, Func<TSource,int> selector);
static member Average : System.Linq.ParallelQuery<'Source> * Func<'Source, int> -> double
<Extension()>
Public Function Average(Of TSource) (source As ParallelQuery(Of TSource), selector As Func(Of TSource, Integer)) As Double

Type Parameters

TSource

The type of elements of source.

Parameters

source
ParallelQuery<TSource>

A sequence of values that are used to calculate an average.

selector
Func<TSource,Int32>

A transform function to apply to each element.

Returns

The average of the sequence of values.

Exceptions

source or selector is a null reference (Nothing in Visual Basic).

The sum or count of the elements in the sequence is larger than Int32.MaxValue. -or- One or more exceptions occurred during the evaluation of the query.

source contains no elements.

(Thrown as inner exception in an AggregateException). The selector function returns a value greater than MaxValue for the element type.

See also

Applies to

Average<TSource>(ParallelQuery<TSource>, Func<TSource,Double>)

Source:
ParallelEnumerable.cs
Source:
ParallelEnumerable.cs
Source:
ParallelEnumerable.cs

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

public:
generic <typename TSource>
[System::Runtime::CompilerServices::Extension]
 static double Average(System::Linq::ParallelQuery<TSource> ^ source, Func<TSource, double> ^ selector);
public static double Average<TSource> (this System.Linq.ParallelQuery<TSource> source, Func<TSource,double> selector);
static member Average : System.Linq.ParallelQuery<'Source> * Func<'Source, double> -> double
<Extension()>
Public Function Average(Of TSource) (source As ParallelQuery(Of TSource), selector As Func(Of TSource, Double)) As Double

Type Parameters

TSource

The type of elements of source.

Parameters

source
ParallelQuery<TSource>

A sequence of values that are used to calculate an average.

selector
Func<TSource,Double>

A transform function to apply to each element.

Returns

The average of the sequence of values.

Exceptions

source or selector is a null reference (Nothing in Visual Basic).

One or more exceptions occurred during the evaluation of the query.

source contains no elements.

(Thrown as inner exception in an AggregateException). The selector function returns a value greater than MaxValue for the element type.

See also

Applies to

Average<TSource>(ParallelQuery<TSource>, Func<TSource,Decimal>)

Source:
ParallelEnumerable.cs
Source:
ParallelEnumerable.cs
Source:
ParallelEnumerable.cs

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

public:
generic <typename TSource>
[System::Runtime::CompilerServices::Extension]
 static System::Decimal Average(System::Linq::ParallelQuery<TSource> ^ source, Func<TSource, System::Decimal> ^ selector);
public static decimal Average<TSource> (this System.Linq.ParallelQuery<TSource> source, Func<TSource,decimal> selector);
static member Average : System.Linq.ParallelQuery<'Source> * Func<'Source, decimal> -> decimal
<Extension()>
Public Function Average(Of TSource) (source As ParallelQuery(Of TSource), selector As Func(Of TSource, Decimal)) As Decimal

Type Parameters

TSource

The type of elements of source.

Parameters

source
ParallelQuery<TSource>

A sequence of values that are used to calculate an average.

selector
Func<TSource,Decimal>

A transform function to apply to each element.

Returns

The average of the sequence of values.

Exceptions

source or selector is a null reference (Nothing in Visual Basic).

One or more exceptions occurred during the evaluation of the query.

source contains no elements.

(Thrown as inner exception in an AggregateException). The selector function returns a value greater than MaxValue for the element type.

See also

Applies to

Average<TSource>(ParallelQuery<TSource>, Func<TSource,Nullable<Decimal>>)

Source:
ParallelEnumerable.cs
Source:
ParallelEnumerable.cs
Source:
ParallelEnumerable.cs

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

public:
generic <typename TSource>
[System::Runtime::CompilerServices::Extension]
 static Nullable<System::Decimal> Average(System::Linq::ParallelQuery<TSource> ^ source, Func<TSource, Nullable<System::Decimal>> ^ selector);
public static decimal? Average<TSource> (this System.Linq.ParallelQuery<TSource> source, Func<TSource,decimal?> selector);
static member Average : System.Linq.ParallelQuery<'Source> * Func<'Source, Nullable<decimal>> -> Nullable<decimal>
<Extension()>
Public Function Average(Of TSource) (source As ParallelQuery(Of TSource), selector As Func(Of TSource, Nullable(Of Decimal))) As Nullable(Of Decimal)

Type Parameters

TSource

The type of elements of source.

Parameters

source
ParallelQuery<TSource>

A sequence of values that are used to calculate an average.

selector
Func<TSource,Nullable<Decimal>>

A transform function to apply to each element.

Returns

The average of the sequence of values.

Exceptions

source or selector is a null reference (Nothing in Visual Basic).

One or more exceptions occurred during the evaluation of the query.

source contains no elements.

(Thrown as inner exception in an AggregateException). The selector function returns a value greater than MaxValue for the element type.

See also

Applies to