---
title: allObjects
framework: foundation
role: symbol
role_heading: Instance Property
path: foundation/nsenumerator/allobjects
---

# allObjects

The array of unenumerated objects.

## Declaration

```swift
var allObjects: [Any] { get }
```

## Discussion

Discussion This array contains all the remaining objects of the enumerator in enumerated order. It does not contain objects that have already been enumerated with previous nextObject() messages. Accessing this property exhausts the enumerator’s collection so that subsequent invocations of nextObject() return nil.

## See Also

### Related Documentation

- [Collections Programming Topics](apple-archive/documentation/Cocoa/Conceptual/Collections.md)

### Getting the Enumerated Objects

- [nextObject()](foundation/nsenumerator/nextobject().md)
