从可查询可观测序列的末尾返回指定数量的连续元素。
Namespace:System.Reactive.Linq
装配: System.Reactive.Providers.dll) 中的 System.Reactive.Providers (
语法
'Declaration
<ExtensionAttribute> _
Public Shared Function TakeLast(Of TSource) ( _
source As IQbservable(Of TSource), _
count As Integer _
) As IQbservable(Of TSource)
'Usage
Dim source As IQbservable(Of TSource)
Dim count As Integer
Dim returnValue As IQbservable(Of TSource)
returnValue = source.TakeLast(count)
public static IQbservable<TSource> TakeLast<TSource>(
this IQbservable<TSource> source,
int count
)
[ExtensionAttribute]
public:
generic<typename TSource>
static IQbservable<TSource>^ TakeLast(
IQbservable<TSource>^ source,
int count
)
static member TakeLast :
source:IQbservable<'TSource> *
count:int -> IQbservable<'TSource>
JScript does not support generic types and methods.
类型参数
- TSource
源的类型。
参数
- source
类型: System.Reactive.Linq.IQbservable<TSource>
源序列。
- count
类型: System.Int32
要从源序列末尾获取的元素数。
返回值
类型: System.Reactive.Linq.IQbservable<TSource>
一个可查询的可观察序列,其中包含源序列的 中指定数量的元素。
使用说明
在 Visual Basic 和 C# 中,可以将此方法作为 IQbservable<TSource> 类型的任何对象的实例方法调用。 当使用实例方法语法调用此方法时,请省略第一个参数。 有关详细信息,请参阅或。