共用方式為


Qbservable.TakeLast < TSource > 方法

從可查詢的可觀察序列結尾傳回指定的連續專案數目。

Namespace:System.Reactive.Linq
裝配: System.Reactive.Providers.dll) 中的 System.Reactive.Providers (

Syntax

'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
    來源的類型。

參數

  • count
    類型: System.Int32
    要從來源序列結尾擷取的專案數目。

傳回值

類型:System.Reactive.Linq.IQbservable< TSource>
可查詢的可觀察序列,其中包含來源序列 的指定專案數目。

使用注意事項

在 Visual Basic 和 C# 中,您可以在IQbservable< TSource > 類型的任何物件上呼叫此方法作為實例方法。 使用執行個體方法語法呼叫這個方法時,請省略第一個參數。 如需詳細資訊,請參閱

另請參閱

參考

Qbservable 類別

System.Reactive.Linq 命名空間