A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://learn.microsoft.com/en-us/dotnet/api/system.linq.parallelenumerable.defaultifempty below:

ParallelEnumerable.DefaultIfEmpty Method (System.Linq) | Microsoft Learn

ParallelEnumerable.DefaultIfEmpty Method Definition

Returns the elements of the specified parallel sequence or the specified value in a singleton collection if the sequence is empty.

Overloads DefaultIfEmpty<TSource>(ParallelQuery<TSource>)
Source:
ParallelEnumerable.cs
Source:
ParallelEnumerable.cs
Source:
ParallelEnumerable.cs
Source:
ParallelEnumerable.cs

Returns the elements of the specified parallel sequence or the type parameter's default value in a singleton collection if the sequence is empty.

public:
generic <typename TSource>
[System::Runtime::CompilerServices::Extension]
 static System::Linq::ParallelQuery<TSource> ^ DefaultIfEmpty(System::Linq::ParallelQuery<TSource> ^ source);
public static System.Linq.ParallelQuery<TSource> DefaultIfEmpty<TSource>(this System.Linq.ParallelQuery<TSource> source);
static member DefaultIfEmpty : System.Linq.ParallelQuery<'Source> -> System.Linq.ParallelQuery<'Source>
<Extension()>
Public Function DefaultIfEmpty(Of TSource) (source As ParallelQuery(Of TSource)) As ParallelQuery(Of TSource)
Type Parameters
TSource

The type of the elements of source.

Parameters Returns

A sequence that contains default(TSource) if source is empty; otherwise, source.

Exceptions

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

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

See also DefaultIfEmpty<TSource>(ParallelQuery<TSource>, TSource)
Source:
ParallelEnumerable.cs
Source:
ParallelEnumerable.cs
Source:
ParallelEnumerable.cs
Source:
ParallelEnumerable.cs

Returns the elements of the specified parallel sequence or the specified value in a singleton collection if the sequence is empty.

public:
generic <typename TSource>
[System::Runtime::CompilerServices::Extension]
 static System::Linq::ParallelQuery<TSource> ^ DefaultIfEmpty(System::Linq::ParallelQuery<TSource> ^ source, TSource defaultValue);
public static System.Linq.ParallelQuery<TSource> DefaultIfEmpty<TSource>(this System.Linq.ParallelQuery<TSource> source, TSource defaultValue);
static member DefaultIfEmpty : System.Linq.ParallelQuery<'Source> * 'Source -> System.Linq.ParallelQuery<'Source>
<Extension()>
Public Function DefaultIfEmpty(Of TSource) (source As ParallelQuery(Of TSource), defaultValue As TSource) As ParallelQuery(Of TSource)
Type Parameters
TSource

The type of the elements of source.

Parameters
defaultValue
TSource

The value to return if the sequence is empty.

Returns

A sequence that contains defaultValue if source is empty; otherwise, source.

Exceptions

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

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

See also

Collaborate with us on GitHub

The source for this content can be found on GitHub, where you can also create and review issues and pull requests. For more information, see our contributor guide. In this article

Was this page helpful?


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4