---
title: set
framework: foundation
role: symbol
role_heading: Instance Property
path: foundation/nsorderedset/set
---

# set

A representation of the set containing the contents of the ordered set.

## Declaration

```swift
var set: Set<AnyHashable> { get }
```

## Discussion

Discussion This returns a proxy object for the receiving ordered set, which acts like an immutable set. While you cannot mutate the ordered set through this proxy, mutations to the original ordered set will be reflected in the proxy and it will appear to change spontaneously, because a copy of the ordered set is not being made.

## See Also

### Converting Other Collections

- [array](foundation/nsorderedset/array.md)
