Jump to Content
nativescript-enumerableDiscussions
API ReferenceDiscussions
v3.5.1

Discussionsnativescript-enumerable
API Reference
v3.5.1API ReferenceDiscussions

Documentation

  • Getting Started
  • Functions and lambdas
  • What are "sequences"?

Functions

  • asFunc
  • asEnumerable
  • create
  • each
  • fromArray
  • fromObject
  • range
  • repeat
  • sort
  • sortDesc
  • toComparerSafe
  • toEqualityComparerSafe
  • toPredicateSafe

Methods

  • aggregate
  • all
  • any
  • average
  • cast
  • concat
  • contains
  • count
  • defaultIfEmpty
  • distinct
  • each
  • elementAt
  • elementAtOrDefault
  • except
  • first
  • firstOrDefault
  • groupBy
  • groupJoin
  • intersect
  • join
  • last
  • lastOrDefault
  • max
  • min
  • ofType
  • order
  • orderBy
  • orderByDescending
  • orderDescending
  • pushToArray
  • reverse
  • select
  • selectMany
  • sequenceEqual
  • single
  • singleOrDefault
  • skip
  • skipLast
  • skipWhile
  • sum
  • take
  • takeWhile
  • toArray
  • then
  • thenBy
  • thenByDescending
  • thenDescending
  • toObject
  • toObservable
  • toObservableArray
  • toLookup
  • union
  • where
  • zip
Powered by 

count

Returns the number of elements.

// 3
Enumerable.create(0, 1, 2)
          .count();

// 0
Enumerable.create()
          .count();

// 2
Enumerable.create(0, 1, 2)
          .count(x => x > 0);