# ParallelEnumerable.Sum Método

## Definición

Calcula en paralelo la suma de una secuencia de valores.Computes in parallel the sum of a sequence of values.

## Sum(ParallelQuery<Nullable<Single>>)

Calcula en paralelo la suma de una secuencia de valores.Computes in parallel the sum of a sequence of values.

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

#### Parámetros

source
ParallelQuery<Nullable<Single>>

Secuencia de valores cuya suma se va a calcular.A sequence of values to calculate the sum of.

#### Devoluciones

Nullable<Single>

Suma de los valores proyectados de la secuencia.The sum of the projected values in the sequence.

#### Excepciones

Se canceló la consulta con el token que se pasa a través de `WithCancellation`.The query was canceled with the token passed in through `WithCancellation`.

`source` es una referencia nula (nada en Visual Basic).`source` is a null reference (Nothing in Visual Basic).

La suma es mayor que MaxValue.The sum is larger than MaxValue. - o bien- Se han producido una o más excepciones durante la evaluación de la consulta.-or- One or more exceptions occurred during the evaluation of the query.

## Sum(ParallelQuery<Nullable<Int64>>)

Calcula en paralelo la suma de una secuencia de valores.Computes in parallel the sum of a sequence of values.

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

#### Parámetros

source
ParallelQuery<Nullable<Int64>>

Secuencia de valores cuya suma se va a calcular.A sequence of values to calculate the sum of.

#### Devoluciones

Nullable<Int64>

Suma de los valores proyectados de la secuencia.The sum of the projected values in the sequence.

#### Excepciones

Se canceló la consulta con el token que se pasa a través de `WithCancellation`.The query was canceled with the token passed in through `WithCancellation`.

`source` es una referencia nula (nada en Visual Basic).`source` is a null reference (Nothing in Visual Basic).

La suma es mayor que MaxValue.The sum is larger than MaxValue. - o bien- Se han producido una o más excepciones durante la evaluación de la consulta.-or- One or more exceptions occurred during the evaluation of the query.

## Sum(ParallelQuery<Nullable<Int32>>)

Calcula en paralelo la suma de una secuencia de valores.Computes in parallel the sum of a sequence of values.

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

#### Parámetros

source
ParallelQuery<Nullable<Int32>>

Secuencia de valores cuya suma se va a calcular.A sequence of values to calculate the sum of.

#### Devoluciones

Nullable<Int32>

Suma de los valores proyectados de la secuencia.The sum of the projected values in the sequence.

#### Excepciones

Se canceló la consulta con el token que se pasa a través de `WithCancellation`.The query was canceled with the token passed in through `WithCancellation`.

`source` es una referencia nula (nada en Visual Basic).`source` is a null reference (Nothing in Visual Basic).

La suma es mayor que MaxValue.The sum is larger than MaxValue. - o bien- Se han producido una o más excepciones durante la evaluación de la consulta.-or- One or more exceptions occurred during the evaluation of the query.

## Sum(ParallelQuery<Nullable<Double>>)

Calcula en paralelo la suma de una secuencia de valores.Computes in parallel the sum of a sequence of values.

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

#### Parámetros

source
ParallelQuery<Nullable<Double>>

Secuencia de valores cuya suma se va a calcular.A sequence of values to calculate the sum of.

#### Devoluciones

Nullable<Double>

Suma de los valores proyectados de la secuencia.The sum of the projected values in the sequence.

#### Excepciones

Se canceló la consulta con el token que se pasa a través de `WithCancellation`.The query was canceled with the token passed in through `WithCancellation`.

`source` es una referencia nula (nada en Visual Basic).`source` is a null reference (Nothing in Visual Basic).

La suma es mayor que MaxValue.The sum is larger than MaxValue. - o bien- Se han producido una o más excepciones durante la evaluación de la consulta.-or- One or more exceptions occurred during the evaluation of the query.

## Sum(ParallelQuery<Single>)

Calcula en paralelo la suma de una secuencia de valores.Computes in parallel the sum of a sequence of values.

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

#### Parámetros

source
ParallelQuery<Single>

Secuencia de valores cuya suma se va a calcular.A sequence of values to calculate the sum of.

#### Devoluciones

Single

Suma de los valores proyectados de la secuencia.The sum of the projected values in the sequence.

#### Excepciones

Se canceló la consulta con el token que se pasa a través de `WithCancellation`.The query was canceled with the token passed in through `WithCancellation`.

`source` es una referencia nula (nada en Visual Basic).`source` is a null reference (Nothing in Visual Basic).

La suma es mayor que MaxValue.The sum is larger than MaxValue. - o bien- Se han producido una o más excepciones durante la evaluación de la consulta.-or- One or more exceptions occurred during the evaluation of the query.

## Sum(ParallelQuery<Int64>)

Calcula en paralelo la suma de una secuencia de valores.Computes in parallel the sum of a sequence of values.

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

#### Parámetros

source
ParallelQuery<Int64>

Secuencia de valores cuya suma se va a calcular.A sequence of values to calculate the sum of.

#### Devoluciones

Int64

Suma de los valores proyectados de la secuencia.The sum of the projected values in the sequence.

#### Excepciones

Se canceló la consulta con el token que se pasa a través de `WithCancellation`.The query was canceled with the token passed in through `WithCancellation`.

`source` es una referencia nula (nada en Visual Basic).`source` is a null reference (Nothing in Visual Basic).

La suma es mayor que MaxValue.The sum is larger than MaxValue. - o bien- Se han producido una o más excepciones durante la evaluación de la consulta.-or- One or more exceptions occurred during the evaluation of the query.

## Sum(ParallelQuery<Int32>)

Calcula en paralelo la suma de una secuencia de valores.Computes in parallel the sum of a sequence of values.

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

#### Parámetros

source
ParallelQuery<Int32>

Secuencia de valores cuya suma se va a calcular.A sequence of values to calculate the sum of.

#### Devoluciones

Int32

Suma de los valores proyectados de la secuencia.The sum of the projected values in the sequence.

#### Excepciones

Se canceló la consulta con el token que se pasa a través de `WithCancellation`.The query was canceled with the token passed in through `WithCancellation`.

`source` es una referencia nula (nada en Visual Basic).`source` is a null reference (Nothing in Visual Basic).

La suma es mayor que MaxValue.The sum is larger than MaxValue. - o bien- Se han producido una o más excepciones durante la evaluación de la consulta.-or- One or more exceptions occurred during the evaluation of the query.

## Sum(ParallelQuery<Double>)

Calcula en paralelo la suma de una secuencia de valores.Computes in parallel the sum of a sequence of values.

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

#### Parámetros

source
ParallelQuery<Double>

Secuencia de valores cuya suma se va a calcular.A sequence of values to calculate the sum of.

#### Devoluciones

Double

Suma de los valores proyectados de la secuencia.The sum of the projected values in the sequence.

#### Excepciones

Se canceló la consulta con el token que se pasa a través de `WithCancellation`.The query was canceled with the token passed in through `WithCancellation`.

`source` es una referencia nula (nada en Visual Basic).`source` is a null reference (Nothing in Visual Basic).

La suma es mayor que MaxValue.The sum is larger than MaxValue. - o bien- Se han producido una o más excepciones durante la evaluación de la consulta.-or- One or more exceptions occurred during the evaluation of the query.

## Sum(ParallelQuery<Decimal>)

Calcula en paralelo la suma de una secuencia de valores.Computes in parallel the sum of a sequence of values.

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

#### Parámetros

source
ParallelQuery<Decimal>

Secuencia de valores cuya suma se va a calcular.A sequence of values to calculate the sum of.

#### Devoluciones

Decimal

Suma de los valores proyectados de la secuencia.The sum of the projected values in the sequence.

#### Excepciones

Se canceló la consulta con el token que se pasa a través de `WithCancellation`.The query was canceled with the token passed in through `WithCancellation`.

`source` es una referencia nula (nada en Visual Basic).`source` is a null reference (Nothing in Visual Basic).

La suma es mayor que MaxValue.The sum is larger than MaxValue. - o bien- Se han producido una o más excepciones durante la evaluación de la consulta.-or- One or more exceptions occurred during the evaluation of the query.

## Sum(ParallelQuery<Nullable<Decimal>>)

Calcula en paralelo la suma de una secuencia de valores.Computes in parallel the sum of a sequence of values.

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

#### Parámetros

source
ParallelQuery<Nullable<Decimal>>

Secuencia de valores cuya suma se va a calcular.A sequence of values to calculate the sum of.

#### Devoluciones

Nullable<Decimal>

Suma de los valores proyectados de la secuencia.The sum of the projected values in the sequence.

#### Excepciones

Se canceló la consulta con el token que se pasa a través de `WithCancellation`.The query was canceled with the token passed in through `WithCancellation`.

`source` es una referencia nula (nada en Visual Basic).`source` is a null reference (Nothing in Visual Basic).

La suma es mayor que MaxValue.The sum is larger than MaxValue. - o bien- Se han producido una o más excepciones durante la evaluación de la consulta.-or- One or more exceptions occurred during the evaluation of the query.

## Sum<TSource>(ParallelQuery<TSource>, Func<TSource,Single>)

Calcula en paralelo la suma de la secuencia de valores que se obtienen mediante la invocación de una función de transformación en cada elemento de la secuencia de entrada.Computes in parallel the sum of the 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 Sum(System::Linq::ParallelQuery<TSource> ^ source, Func<TSource, float> ^ selector);``````
``public static float Sum<TSource> (this System.Linq.ParallelQuery<TSource> source, Func<TSource,float> selector);``
``static member Sum : System.Linq.ParallelQuery<'Source> * Func<'Source, single> -> single``
``````<Extension()>
Public Function Sum(Of TSource) (source As ParallelQuery(Of TSource), selector As Func(Of TSource, Single)) As Single``````

#### Parámetros de tipo

TSource

Tipo de elementos de `source`.The type of elements of `source`.

#### Parámetros

source
ParallelQuery<TSource>

Secuencia de valores cuya suma se va a calcular.A sequence of values to calculate the sum of.

selector
Func<TSource,Single>

Función de transformación que se va a aplicar a cada elemento.A transform function to apply to each element.

#### Devoluciones

Single

Suma de los valores proyectados de la secuencia.The sum of the projected values in the sequence.

#### Excepciones

Se canceló la consulta con el token que se pasa a través de `WithCancellation`.The query was canceled with the token passed in through `WithCancellation`.

`source` o `selector` es una referencia nula (Nothing en Visual Basic).`source` or `selector` is a null reference (Nothing in Visual Basic).

La suma es mayor que MaxValue.The sum is larger than MaxValue. - o bien- Se han producido una o más excepciones durante la evaluación de la consulta.-or- One or more exceptions occurred during the evaluation of the query.

## Sum<TSource>(ParallelQuery<TSource>, Func<TSource,Decimal>)

Calcula en paralelo la suma de la secuencia de valores que se obtienen mediante la invocación de una función de transformación en cada elemento de la secuencia de entrada.Computes in parallel the sum of the 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 Sum(System::Linq::ParallelQuery<TSource> ^ source, Func<TSource, System::Decimal> ^ selector);``````
``public static decimal Sum<TSource> (this System.Linq.ParallelQuery<TSource> source, Func<TSource,decimal> selector);``
``static member Sum : System.Linq.ParallelQuery<'Source> * Func<'Source, decimal> -> decimal``
``````<Extension()>
Public Function Sum(Of TSource) (source As ParallelQuery(Of TSource), selector As Func(Of TSource, Decimal)) As Decimal``````

#### Parámetros de tipo

TSource

Tipo de elementos de `source`.The type of elements of `source`.

#### Parámetros

source
ParallelQuery<TSource>

Secuencia de valores cuya suma se va a calcular.A sequence of values to calculate the sum of.

selector
Func<TSource,Decimal>

Función de transformación que se va a aplicar a cada elemento.A transform function to apply to each element.

#### Devoluciones

Decimal

Suma de los valores proyectados de la secuencia.The sum of the projected values in the sequence.

#### Excepciones

Se canceló la consulta con el token que se pasa a través de `WithCancellation`.The query was canceled with the token passed in through `WithCancellation`.

`source` o `selector` es una referencia nula (Nothing en Visual Basic).`source` or `selector` is a null reference (Nothing in Visual Basic).

La suma es mayor que MaxValue.The sum is larger than MaxValue. - o bien- Se han producido una o más excepciones durante la evaluación de la consulta.-or- One or more exceptions occurred during the evaluation of the query.

## Sum<TSource>(ParallelQuery<TSource>, Func<TSource,Double>)

Calcula en paralelo la suma de la secuencia de valores que se obtienen mediante la invocación de una función de transformación en cada elemento de la secuencia de entrada.Computes in parallel the sum of the 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 Sum(System::Linq::ParallelQuery<TSource> ^ source, Func<TSource, double> ^ selector);``````
``public static double Sum<TSource> (this System.Linq.ParallelQuery<TSource> source, Func<TSource,double> selector);``
``static member Sum : System.Linq.ParallelQuery<'Source> * Func<'Source, double> -> double``
``````<Extension()>
Public Function Sum(Of TSource) (source As ParallelQuery(Of TSource), selector As Func(Of TSource, Double)) As Double``````

#### Parámetros de tipo

TSource

Tipo de elementos de `source`.The type of elements of `source`.

#### Parámetros

source
ParallelQuery<TSource>

Secuencia de valores cuya suma se va a calcular.A sequence of values to calculate the sum of.

selector
Func<TSource,Double>

Función de transformación que se va a aplicar a cada elemento.A transform function to apply to each element.

#### Devoluciones

Double

Suma de los valores proyectados de la secuencia.The sum of the projected values in the sequence.

#### Excepciones

Se canceló la consulta con el token que se pasa a través de `WithCancellation`.The query was canceled with the token passed in through `WithCancellation`.

`source` o `selector` es una referencia nula (Nothing en Visual Basic).`source` or `selector` is a null reference (Nothing in Visual Basic).

La suma es mayor que MaxValue.The sum is larger than MaxValue. - o bien- Se han producido una o más excepciones durante la evaluación de la consulta.-or- One or more exceptions occurred during the evaluation of the query.

## Sum<TSource>(ParallelQuery<TSource>, Func<TSource,Int32>)

Calcula en paralelo la suma de la secuencia de valores que se obtienen mediante la invocación de una función de transformación en cada elemento de la secuencia de entrada.Computes in parallel the sum of the 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 int Sum(System::Linq::ParallelQuery<TSource> ^ source, Func<TSource, int> ^ selector);``````
``public static int Sum<TSource> (this System.Linq.ParallelQuery<TSource> source, Func<TSource,int> selector);``
``static member Sum : System.Linq.ParallelQuery<'Source> * Func<'Source, int> -> int``
``````<Extension()>
Public Function Sum(Of TSource) (source As ParallelQuery(Of TSource), selector As Func(Of TSource, Integer)) As Integer``````

#### Parámetros de tipo

TSource

Tipo de elementos de la secuencia de salida.The type of elements in the source sequence.

#### Parámetros

source
ParallelQuery<TSource>

Secuencia de valores cuya suma se va a calcular.A sequence of values to calculate the sum of.

selector
Func<TSource,Int32>

Función de transformación que se va a aplicar a cada elemento.A transform function to apply to each element.

#### Devoluciones

Int32

Suma de los valores proyectados de la secuencia.The sum of the projected values in the sequence.

#### Excepciones

Se canceló la consulta con el token que se pasa a través de `WithCancellation`.The query was canceled with the token passed in through `WithCancellation`.

`source` o `selector` es una referencia nula (Nothing en Visual Basic).`source` or `selector` is a null reference (Nothing in Visual Basic).

La suma es mayor que MaxValue.The sum is larger than MaxValue. - o bien- Se han producido una o más excepciones durante la evaluación de la consulta.-or- One or more exceptions occurred during the evaluation of the query.

## Sum<TSource>(ParallelQuery<TSource>, Func<TSource,Int64>)

Calcula en paralelo la suma de la secuencia de valores que se obtienen mediante la invocación de una función de transformación en cada elemento de la secuencia de entrada.Computes in parallel the sum of the 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 long Sum(System::Linq::ParallelQuery<TSource> ^ source, Func<TSource, long> ^ selector);``````
``public static long Sum<TSource> (this System.Linq.ParallelQuery<TSource> source, Func<TSource,long> selector);``
``static member Sum : System.Linq.ParallelQuery<'Source> * Func<'Source, int64> -> int64``
``````<Extension()>
Public Function Sum(Of TSource) (source As ParallelQuery(Of TSource), selector As Func(Of TSource, Long)) As Long``````

#### Parámetros de tipo

TSource

Tipo de elementos de `source`.The type of elements of `source`.

#### Parámetros

source
ParallelQuery<TSource>

Secuencia de valores cuya suma se va a calcular.A sequence of values to calculate the sum of.

selector
Func<TSource,Int64>

Función de transformación que se va a aplicar a cada elemento.A transform function to apply to each element.

#### Devoluciones

Int64

Suma de los valores proyectados de la secuencia.The sum of the projected values in the sequence.

#### Excepciones

Se canceló la consulta con el token que se pasa a través de `WithCancellation`.The query was canceled with the token passed in through `WithCancellation`.

`source` o `selector` es una referencia nula (Nothing en Visual Basic).`source` or `selector` is a null reference (Nothing in Visual Basic).

La suma es mayor que MaxValue.The sum is larger than MaxValue. - o bien- Se han producido una o más excepciones durante la evaluación de la consulta.-or- One or more exceptions occurred during the evaluation of the query.

## Sum<TSource>(ParallelQuery<TSource>, Func<TSource,Nullable<Decimal>>)

Calcula en paralelo la suma de la secuencia de valores que se obtienen mediante la invocación de una función de transformación en cada elemento de la secuencia de entrada.Computes in parallel the sum of the 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> Sum(System::Linq::ParallelQuery<TSource> ^ source, Func<TSource, Nullable<System::Decimal>> ^ selector);``````
``public static decimal? Sum<TSource> (this System.Linq.ParallelQuery<TSource> source, Func<TSource,decimal?> selector);``
``static member Sum : System.Linq.ParallelQuery<'Source> * Func<'Source, Nullable<decimal>> -> Nullable<decimal>``
``````<Extension()>
Public Function Sum(Of TSource) (source As ParallelQuery(Of TSource), selector As Func(Of TSource, Nullable(Of Decimal))) As Nullable(Of Decimal)``````

#### Parámetros de tipo

TSource

Tipo de elementos de `source`.The type of elements of `source`.

#### Parámetros

source
ParallelQuery<TSource>

Secuencia de valores cuya suma se va a calcular.A sequence of values to calculate the sum of.

selector
Func<TSource,Nullable<Decimal>>

Función de transformación que se va a aplicar a cada elemento.A transform function to apply to each element.

#### Devoluciones

Nullable<Decimal>

Suma de los valores proyectados de la secuencia.The sum of the projected values in the sequence.

#### Excepciones

Se canceló la consulta con el token que se pasa a través de `WithCancellation`.The query was canceled with the token passed in through `WithCancellation`.

`source` o `selector` es una referencia nula (Nothing en Visual Basic).`source` or `selector` is a null reference (Nothing in Visual Basic).

La suma es mayor que MaxValue.The sum is larger than MaxValue. - o bien- Se han producido una o más excepciones durante la evaluación de la consulta.-or- One or more exceptions occurred during the evaluation of the query.

## Sum<TSource>(ParallelQuery<TSource>, Func<TSource,Nullable<Double>>)

Calcula en paralelo la suma de la secuencia de valores que se obtienen mediante la invocación de una función de transformación en cada elemento de la secuencia de entrada.Computes in parallel the sum of the 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> Sum(System::Linq::ParallelQuery<TSource> ^ source, Func<TSource, Nullable<double>> ^ selector);``````
``public static double? Sum<TSource> (this System.Linq.ParallelQuery<TSource> source, Func<TSource,double?> selector);``
``static member Sum : System.Linq.ParallelQuery<'Source> * Func<'Source, Nullable<double>> -> Nullable<double>``
``````<Extension()>
Public Function Sum(Of TSource) (source As ParallelQuery(Of TSource), selector As Func(Of TSource, Nullable(Of Double))) As Nullable(Of Double)``````

#### Parámetros de tipo

TSource

Tipo de elementos de `source`.The type of elements of `source`.

#### Parámetros

source
ParallelQuery<TSource>

Secuencia de valores cuya suma se va a calcular.A sequence of values to calculate the sum of.

selector
Func<TSource,Nullable<Double>>

Función de transformación que se va a aplicar a cada elemento.A transform function to apply to each element.

#### Devoluciones

Nullable<Double>

Suma de los valores proyectados de la secuencia.The sum of the projected values in the sequence.

#### Excepciones

Se canceló la consulta con el token que se pasa a través de `WithCancellation`.The query was canceled with the token passed in through `WithCancellation`.

`source` o `selector` es una referencia nula (Nothing en Visual Basic).`source` or `selector` is a null reference (Nothing in Visual Basic).

La suma es mayor que MaxValue.The sum is larger than MaxValue. - o bien- Se han producido una o más excepciones durante la evaluación de la consulta.-or- One or more exceptions occurred during the evaluation of the query.

## Sum<TSource>(ParallelQuery<TSource>, Func<TSource,Nullable<Int32>>)

Calcula en paralelo la suma de la secuencia de valores que se obtienen mediante la invocación de una función de transformación en cada elemento de la secuencia de entrada.Computes in parallel the sum of the 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<int> Sum(System::Linq::ParallelQuery<TSource> ^ source, Func<TSource, Nullable<int>> ^ selector);``````
``public static int? Sum<TSource> (this System.Linq.ParallelQuery<TSource> source, Func<TSource,int?> selector);``
``static member Sum : System.Linq.ParallelQuery<'Source> * Func<'Source, Nullable<int>> -> Nullable<int>``
``````<Extension()>
Public Function Sum(Of TSource) (source As ParallelQuery(Of TSource), selector As Func(Of TSource, Nullable(Of Integer))) As Nullable(Of Integer)``````

#### Parámetros de tipo

TSource

Tipo de elementos de `source`.The type of elements of `source`.

#### Parámetros

source
ParallelQuery<TSource>

Secuencia de valores cuya suma se va a calcular.A sequence of values to calculate the sum of.

selector
Func<TSource,Nullable<Int32>>

Función de transformación que se va a aplicar a cada elemento.A transform function to apply to each element.

#### Devoluciones

Nullable<Int32>

Suma de los valores proyectados de la secuencia.The sum of the projected values in the sequence.

#### Excepciones

Se canceló la consulta con el token que se pasa a través de `WithCancellation`.The query was canceled with the token passed in through `WithCancellation`.

`source` o `selector` es una referencia nula (Nothing en Visual Basic).`source` or `selector` is a null reference (Nothing in Visual Basic).

La suma es mayor que MaxValue.The sum is larger than MaxValue. - o bien- Se han producido una o más excepciones durante la evaluación de la consulta.-or- One or more exceptions occurred during the evaluation of the query.

## Sum<TSource>(ParallelQuery<TSource>, Func<TSource,Nullable<Int64>>)

Calcula en paralelo la suma de la secuencia de valores que se obtienen mediante la invocación de una función de transformación en cada elemento de la secuencia de entrada.Computes in parallel the sum of the 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<long> Sum(System::Linq::ParallelQuery<TSource> ^ source, Func<TSource, Nullable<long>> ^ selector);``````
``public static long? Sum<TSource> (this System.Linq.ParallelQuery<TSource> source, Func<TSource,long?> selector);``
``static member Sum : System.Linq.ParallelQuery<'Source> * Func<'Source, Nullable<int64>> -> Nullable<int64>``
``````<Extension()>
Public Function Sum(Of TSource) (source As ParallelQuery(Of TSource), selector As Func(Of TSource, Nullable(Of Long))) As Nullable(Of Long)``````

#### Parámetros de tipo

TSource

Tipo de elementos de `source`.The type of elements of `source`.

#### Parámetros

source
ParallelQuery<TSource>

Secuencia de valores cuya suma se va a calcular.A sequence of values to calculate the sum of.

selector
Func<TSource,Nullable<Int64>>

Función de transformación que se va a aplicar a cada elemento.A transform function to apply to each element.

#### Devoluciones

Nullable<Int64>

Suma de los valores proyectados de la secuencia.The sum of the projected values in the sequence.

#### Excepciones

Se canceló la consulta con el token que se pasa a través de `WithCancellation`.The query was canceled with the token passed in through `WithCancellation`.

`source` o `selector` es una referencia nula (Nothing en Visual Basic).`source` or `selector` is a null reference (Nothing in Visual Basic).

La suma es mayor que MaxValue.The sum is larger than MaxValue. - o bien- Se han producido una o más excepciones durante la evaluación de la consulta.-or- One or more exceptions occurred during the evaluation of the query.

## Sum<TSource>(ParallelQuery<TSource>, Func<TSource,Nullable<Single>>)

Calcula en paralelo la suma de la secuencia de valores que se obtienen mediante la invocación de una función de transformación en cada elemento de la secuencia de entrada.Computes in parallel the sum of the 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> Sum(System::Linq::ParallelQuery<TSource> ^ source, Func<TSource, Nullable<float>> ^ selector);``````
``public static float? Sum<TSource> (this System.Linq.ParallelQuery<TSource> source, Func<TSource,float?> selector);``
``static member Sum : System.Linq.ParallelQuery<'Source> * Func<'Source, Nullable<single>> -> Nullable<single>``
``````<Extension()>
Public Function Sum(Of TSource) (source As ParallelQuery(Of TSource), selector As Func(Of TSource, Nullable(Of Single))) As Nullable(Of Single)``````

#### Parámetros de tipo

TSource

Tipo de elementos de `source`.The type of elements of `source`.

#### Parámetros

source
ParallelQuery<TSource>

Secuencia de valores cuya suma se va a calcular.A sequence of values to calculate the sum of.

selector
Func<TSource,Nullable<Single>>

Función de transformación que se va a aplicar a cada elemento.A transform function to apply to each element.

#### Devoluciones

Nullable<Single>

Suma de los valores proyectados de la secuencia.The sum of the projected values in the sequence.

#### Excepciones

Se canceló la consulta con el token que se pasa a través de `WithCancellation`.The query was canceled with the token passed in through `WithCancellation`.

`source` o `selector` es una referencia nula (Nothing en Visual Basic).`source` or `selector` is a null reference (Nothing in Visual Basic).

La suma es mayor que MaxValue.The sum is larger than MaxValue. - o bien- Se han producido una o más excepciones durante la evaluación de la consulta.-or- One or more exceptions occurred during the evaluation of the query.