For the first count items from this observable emit them from the new observable that is returned.
More...
For the first count items from this observable emit them from the new observable that is returned.
- Template Parameters
-
Count | the type of the items counter. |
- Parameters
-
t | the number of items to take. |
- Returns
- An observable that emits only the first t items emitted by the source Observable, or all of the items from the source observable if that observable emits fewer than t items.
- Sample Code
values.
[](int v){printf("OnNext: %d\n", v);},
[](){printf("OnCompleted\n");});
OnNext: 1
OnNext: 2
OnNext: 3
OnCompleted