Instance Property

count

The number of key-value pairs in the dictionary.

Declaration

var count: Int { get }

Discussion

Complexity: O(1).

Relationships

From Protocol

See Also

Inspecting a Dictionary

var isEmpty: Bool

A Boolean value that indicates whether the dictionary is empty.

var capacity: Int

The total number of key-value pairs that the dictionary can contain without allocating new storage.