AsyncEnumerable.TakeLast<TSource> 方法

定义

返回包含最后 count 一个元素的新 source序列。

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

类型参数

TSource

source元素的类型。

参数

source
IAsyncEnumerable<TSource>

要从中返回元素的序列。

count
Int32

要从序列末尾获取的元素数。

返回

IAsyncEnumerable<TSource>

包含上 count 一个元素 source的新序列。

适用于