---
title: "add(in:)"
framework: foundation
role: symbol
role_heading: Instance Method
path: "foundation/nsmutableindexset/add(in:)"
---

# add(in:)

Adds the indexes in an index range to the receiver.

## Declaration

```swift
func add(in range: NSRange)
```

## Parameters

- `range`: Index range to add. Must be in the range 0 .. NSNotFound - 1.

## Discussion

Discussion This method raises an rangeException when range would add an index that exceeds the maximum allowed value for unsigned integers.

## See Also

### Adding Indexes

- [add(_:)](foundation/nsmutableindexset/add(_:)-6dtkj.md)
- [add(_:)](foundation/nsmutableindexset/add(_:)-6zmti.md)
