語言

AsyncEnumerable.Prepend<TSource> 方法

定義

將值加入序列的開頭。

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)

類型參數

TSource

來源元素的類型。

參數

source
IAsyncEnumerable<TSource>

一連串的數值。

element
TSource

價值是先於來源的前置。

傳回

IAsyncEnumerable<TSource>

一個以元素開頭的新序列。

例外狀況

source 是 null。

適用於