ParallelEnumerable.Max Method

Definition

Returns the maximum value in a parallel sequence of values.

Overloads

Max(ParallelQuery<Nullable<Single>>)

Returns the maximum value in a parallel sequence of values.

Max(ParallelQuery<Single>)

Returns the maximum value in a parallel sequence of values.

Max(ParallelQuery<Nullable<Int64>>)

Returns the maximum value in a parallel sequence of values.

Max(ParallelQuery<Nullable<Int32>>)

Returns the maximum value in a parallel sequence of values.

Max(ParallelQuery<Nullable<Double>>)

Returns the maximum value in a parallel sequence of values.

Max(ParallelQuery<Double>)

Returns the maximum value in a parallel sequence of values.

Max(ParallelQuery<Int64>)

Returns the maximum value in a parallel sequence of values.

Max(ParallelQuery<Int32>)

Returns the maximum value in a parallel sequence of values.

Max(ParallelQuery<Decimal>)

Returns the maximum value in a parallel sequence of values.

Max(ParallelQuery<Nullable<Decimal>>)

Returns the maximum value in a parallel sequence of values.

Max<TSource,TResult>(ParallelQuery<TSource>, Func<TSource,TResult>)

Invokes in parallel a transform function on each element of a sequence and returns the maximum value.

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

Invokes in parallel a transform function on each element of a sequence and returns the maximum value.

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

Invokes in parallel a transform function on each element of a sequence and returns the maximum value.

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

Invokes in parallel a transform function on each element of a sequence and returns the maximum value.

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

Invokes in parallel a transform function on each element of a sequence and returns the maximum value.

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

Invokes in parallel a transform function on each element of a sequence and returns the maximum value.

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

Invokes in parallel a transform function on each element of a sequence and returns the maximum value.

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

Invokes in parallel a transform function on each element of a sequence and returns the maximum value.

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

Invokes in parallel a transform function on each element of a sequence and returns the maximum value.

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

Invokes in parallel a transform function on each element of a sequence and returns the maximum value.

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

Invokes in parallel a transform function on each element of a sequence and returns the maximum value.

Max<TSource>(ParallelQuery<TSource>)

Returns the maximum value in a parallel sequence of values.

Max(ParallelQuery<Nullable<Single>>)

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

Returns the maximum value in a parallel sequence of values.

C#
public static float? Max(this System.Linq.ParallelQuery<float?> source);

Parameters

source
ParallelQuery<Nullable<Single>>

A sequence of values to determine the maximum value of.

Returns

The maximum value in the sequence.

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

.NET 9 and other versions
Product Versions
.NET Core 1.0, Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9
.NET Framework 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0, 2.1
UWP 10.0

Max(ParallelQuery<Single>)

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

Returns the maximum value in a parallel sequence of values.

C#
public static float Max(this System.Linq.ParallelQuery<float> source);

Parameters

source
ParallelQuery<Single>

A sequence of values to determine the maximum value of.

Returns

The maximum value in the sequence.

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

.NET 9 and other versions
Product Versions
.NET Core 1.0, Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9
.NET Framework 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0, 2.1
UWP 10.0

Max(ParallelQuery<Nullable<Int64>>)

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

Returns the maximum value in a parallel sequence of values.

C#
public static long? Max(this System.Linq.ParallelQuery<long?> source);

Parameters

source
ParallelQuery<Nullable<Int64>>

A sequence of values to determine the maximum value of.

Returns

The maximum value in the sequence.

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

.NET 9 and other versions
Product Versions
.NET Core 1.0, Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9
.NET Framework 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0, 2.1
UWP 10.0

Max(ParallelQuery<Nullable<Int32>>)

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

Returns the maximum value in a parallel sequence of values.

C#
public static int? Max(this System.Linq.ParallelQuery<int?> source);

Parameters

source
ParallelQuery<Nullable<Int32>>

A sequence of values to determine the maximum value of.

Returns

The maximum value in the sequence.

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

.NET 9 and other versions
Product Versions
.NET Core 1.0, Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9
.NET Framework 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0, 2.1
UWP 10.0

Max(ParallelQuery<Nullable<Double>>)

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

Returns the maximum value in a parallel sequence of values.

C#
public static double? Max(this System.Linq.ParallelQuery<double?> source);

Parameters

source
ParallelQuery<Nullable<Double>>

A sequence of values to determine the maximum value of.

Returns

The maximum value in the sequence.

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

.NET 9 and other versions
Product Versions
.NET Core 1.0, Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9
.NET Framework 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0, 2.1
UWP 10.0

Max(ParallelQuery<Double>)

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

Returns the maximum value in a parallel sequence of values.

C#
public static double Max(this System.Linq.ParallelQuery<double> source);

Parameters

source
ParallelQuery<Double>

A sequence of values to determine the maximum value of.

Returns

The maximum value in the sequence.

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

.NET 9 and other versions
Product Versions
.NET Core 1.0, Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9
.NET Framework 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0, 2.1
UWP 10.0

Max(ParallelQuery<Int64>)

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

Returns the maximum value in a parallel sequence of values.

C#
public static long Max(this System.Linq.ParallelQuery<long> source);

Parameters

source
ParallelQuery<Int64>

A sequence of values to determine the maximum value of.

Returns

The maximum value in the sequence.

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

.NET 9 and other versions
Product Versions
.NET Core 1.0, Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9
.NET Framework 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0, 2.1
UWP 10.0

Max(ParallelQuery<Int32>)

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

Returns the maximum value in a parallel sequence of values.

C#
public static int Max(this System.Linq.ParallelQuery<int> source);

Parameters

source
ParallelQuery<Int32>

A sequence of values to determine the maximum value of.

Returns

The maximum value in the sequence.

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

.NET 9 and other versions
Product Versions
.NET Core 1.0, Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9
.NET Framework 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0, 2.1
UWP 10.0

Max(ParallelQuery<Decimal>)

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

Returns the maximum value in a parallel sequence of values.

C#
public static decimal Max(this System.Linq.ParallelQuery<decimal> source);

Parameters

source
ParallelQuery<Decimal>

A sequence of values to determine the maximum value of.

Returns

The maximum value in the sequence.

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

.NET 9 and other versions
Product Versions
.NET Core 1.0, Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9
.NET Framework 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0, 2.1
UWP 10.0

Max(ParallelQuery<Nullable<Decimal>>)

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

Returns the maximum value in a parallel sequence of values.

C#
public static decimal? Max(this System.Linq.ParallelQuery<decimal?> source);

Parameters

source
ParallelQuery<Nullable<Decimal>>

A sequence of values to determine the maximum value of.

Returns

The maximum value in the sequence.

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

.NET 9 and other versions
Product Versions
.NET Core 1.0, Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9
.NET Framework 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0, 2.1
UWP 10.0

Max<TSource,TResult>(ParallelQuery<TSource>, Func<TSource,TResult>)

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

Invokes in parallel a transform function on each element of a sequence and returns the maximum value.

C#
public static TResult Max<TSource,TResult>(this System.Linq.ParallelQuery<TSource> source, Func<TSource,TResult> selector);
C#
public static TResult? Max<TSource,TResult>(this System.Linq.ParallelQuery<TSource> source, Func<TSource,TResult> selector);

Type Parameters

TSource

The type of elements of source.

TResult

The type of the value returned by selector.

Parameters

source
ParallelQuery<TSource>

A sequence of values to determine the maximum value of.

selector
Func<TSource,TResult>

A transform function to apply to each element.

Returns

TResult

The maximum value in the sequence.

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 and TSource is a non-nullable value type.

See also

Applies to

.NET 9 and other versions
Product Versions
.NET Core 1.0, Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9
.NET Framework 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0, 2.1
UWP 10.0

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

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

Invokes in parallel a transform function on each element of a sequence and returns the maximum value.

C#
public static long? Max<TSource>(this System.Linq.ParallelQuery<TSource> source, Func<TSource,long?> selector);

Type Parameters

TSource

The type of elements of source.

Parameters

source
ParallelQuery<TSource>

A sequence of values to determine the maximum value of.

selector
Func<TSource,Nullable<Int64>>

A transform function to apply to each element.

Returns

The maximum value in the sequence.

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.

See also

Applies to

.NET 9 and other versions
Product Versions
.NET Core 1.0, Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9
.NET Framework 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0, 2.1
UWP 10.0

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

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

Invokes in parallel a transform function on each element of a sequence and returns the maximum value.

C#
public static float Max<TSource>(this System.Linq.ParallelQuery<TSource> source, Func<TSource,float> selector);

Type Parameters

TSource

The type of elements of source.

Parameters

source
ParallelQuery<TSource>

A sequence of values to determine the maximum value of.

selector
Func<TSource,Single>

A transform function to apply to each element.

Returns

The maximum value in the sequence.

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 and TSource is a non-nullable value type.

See also

Applies to

.NET 9 and other versions
Product Versions
.NET Core 1.0, Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9
.NET Framework 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0, 2.1
UWP 10.0

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

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

Invokes in parallel a transform function on each element of a sequence and returns the maximum value.

C#
public static float? Max<TSource>(this System.Linq.ParallelQuery<TSource> source, Func<TSource,float?> selector);

Type Parameters

TSource

The type of elements of source.

Parameters

source
ParallelQuery<TSource>

A sequence of values to determine the maximum value of.

selector
Func<TSource,Nullable<Single>>

A transform function to apply to each element.

Returns

The maximum value in the sequence.

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.

See also

Applies to

.NET 9 and other versions
Product Versions
.NET Core 1.0, Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9
.NET Framework 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0, 2.1
UWP 10.0

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

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

Invokes in parallel a transform function on each element of a sequence and returns the maximum value.

C#
public static int? Max<TSource>(this System.Linq.ParallelQuery<TSource> source, Func<TSource,int?> selector);

Type Parameters

TSource

The type of elements of source.

Parameters

source
ParallelQuery<TSource>

A sequence of values to determine the maximum value of.

selector
Func<TSource,Nullable<Int32>>

A transform function to apply to each element.

Returns

The maximum value in the sequence.

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.

See also

Applies to

.NET 9 and other versions
Product Versions
.NET Core 1.0, Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9
.NET Framework 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0, 2.1
UWP 10.0

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

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

Invokes in parallel a transform function on each element of a sequence and returns the maximum value.

C#
public static double? Max<TSource>(this System.Linq.ParallelQuery<TSource> source, Func<TSource,double?> selector);

Type Parameters

TSource

The type of elements of source.

Parameters

source
ParallelQuery<TSource>

A sequence of values to determine the maximum value of.

selector
Func<TSource,Nullable<Double>>

A transform function to apply to each element.

Returns

The maximum value in the sequence.

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.

See also

Applies to

.NET 9 and other versions
Product Versions
.NET Core 1.0, Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9
.NET Framework 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0, 2.1
UWP 10.0

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

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

Invokes in parallel a transform function on each element of a sequence and returns the maximum value.

C#
public static decimal? Max<TSource>(this System.Linq.ParallelQuery<TSource> source, Func<TSource,decimal?> selector);

Type Parameters

TSource

The type of elements of source.

Parameters

source
ParallelQuery<TSource>

A sequence of values to determine the maximum value of.

selector
Func<TSource,Nullable<Decimal>>

A transform function to apply to each element.

Returns

The maximum value in the sequence.

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.

See also

Applies to

.NET 9 and other versions
Product Versions
.NET Core 1.0, Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9
.NET Framework 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0, 2.1
UWP 10.0

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

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

Invokes in parallel a transform function on each element of a sequence and returns the maximum value.

C#
public static long Max<TSource>(this System.Linq.ParallelQuery<TSource> source, Func<TSource,long> selector);

Type Parameters

TSource

The type of elements of source.

Parameters

source
ParallelQuery<TSource>

A sequence of values to determine the maximum value of.

selector
Func<TSource,Int64>

A transform function to apply to each element.

Returns

The maximum value in the sequence.

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 and TSource is a non-nullable value type.

See also

Applies to

.NET 9 and other versions
Product Versions
.NET Core 1.0, Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9
.NET Framework 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0, 2.1
UWP 10.0

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

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

Invokes in parallel a transform function on each element of a sequence and returns the maximum value.

C#
public static int Max<TSource>(this System.Linq.ParallelQuery<TSource> source, Func<TSource,int> selector);

Type Parameters

TSource

The type of elements of source.

Parameters

source
ParallelQuery<TSource>

A sequence of values to determine the maximum value of.

selector
Func<TSource,Int32>

A transform function to apply to each element.

Returns

The maximum value in the sequence.

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 and TSource is a non-nullable value type.

See also

Applies to

.NET 9 and other versions
Product Versions
.NET Core 1.0, Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9
.NET Framework 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0, 2.1
UWP 10.0

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

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

Invokes in parallel a transform function on each element of a sequence and returns the maximum value.

C#
public static double Max<TSource>(this System.Linq.ParallelQuery<TSource> source, Func<TSource,double> selector);

Type Parameters

TSource

The type of elements of source.

Parameters

source
ParallelQuery<TSource>

A sequence of values to determine the maximum value of.

selector
Func<TSource,Double>

A transform function to apply to each element.

Returns

The maximum value in the sequence.

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 and TSource is a non-nullable value type.

See also

Applies to

.NET 9 and other versions
Product Versions
.NET Core 1.0, Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9
.NET Framework 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0, 2.1
UWP 10.0

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

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

Invokes in parallel a transform function on each element of a sequence and returns the maximum value.

C#
public static decimal Max<TSource>(this System.Linq.ParallelQuery<TSource> source, Func<TSource,decimal> selector);

Type Parameters

TSource

The type of elements of source.

Parameters

source
ParallelQuery<TSource>

A sequence of values to determine the maximum value of.

selector
Func<TSource,Decimal>

A transform function to apply to each element.

Returns

The maximum value in the sequence.

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 and TSource is a non-nullable value type.

See also

Applies to

.NET 9 and other versions
Product Versions
.NET Core 1.0, Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9
.NET Framework 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0, 2.1
UWP 10.0

Max<TSource>(ParallelQuery<TSource>)

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

Returns the maximum value in a parallel sequence of values.

C#
public static TSource Max<TSource>(this System.Linq.ParallelQuery<TSource> source);
C#
public static TSource? Max<TSource>(this System.Linq.ParallelQuery<TSource> source);

Type Parameters

TSource

The type of elements in the source sequence.

Parameters

source
ParallelQuery<TSource>

A sequence of values to determine the maximum value of.

Returns

TSource

The maximum value in the sequence.

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 and TSource is a non-nullable value type.

See also

Applies to

.NET 9 and other versions
Product Versions
.NET Core 1.0, Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9
.NET Framework 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0, 2.1
UWP 10.0