---
title: "replace(at:withValue:)"
framework: addressbook
role: symbol
role_heading: Instance Method
path: "addressbook/abmutablemultivalue/replace(at:withvalue:)"
---

# replace(at:withValue:)

Replaces the value at the given index.

## Declaration

```swift
func replace(at index: Int, withValue value: Any!) -> Bool
```

## Parameters

- `index`: The index of the value that will be replaced.
- `value`: The new value.

## Return Value

Return Value true if successful; otherwise false.

## Discussion

Discussion If the value is nil or if the index is out of bounds, this method raises an exception.

## See Also

### Replacing values and labels

- [replaceLabel(at:withLabel:)](addressbook/abmutablemultivalue/replacelabel(at:withlabel:).md)
