Editar

Compartir a través de


AsyncEnumerable.Prepend<TSource> Method

Definition

Adds a value to the beginning of the sequence.

public:
generic <typename TSource>
[System::Runtime::CompilerServices::Extension]
 static System::Collections::Generic::IAsyncEnumerable<TSource> ^ Prepend(System::Collections::Generic::IAsyncEnumerable<TSource> ^ source, TSource element);
public static System.Collections.Generic.IAsyncEnumerable<TSource> Prepend<TSource>(this System.Collections.Generic.IAsyncEnumerable<TSource> source, TSource element);
static member Prepend : System.Collections.Generic.IAsyncEnumerable<'Source> * 'Source -> System.Collections.Generic.IAsyncEnumerable<'Source>
<Extension()>
Public Function Prepend(Of TSource) (source As IAsyncEnumerable(Of TSource), element As TSource) As IAsyncEnumerable(Of TSource)

Type Parameters

TSource

The type of the elements of source.

Parameters

source
IAsyncEnumerable<TSource>

A sequence of values.

element
TSource

The value to prepend to source.

Returns

IAsyncEnumerable<TSource>

A new sequence that begins with element.

Exceptions

source is null.

Applies to