<!-- Generated by tools/SharpCell.Docs from the XML documentation comments. Do not edit; run the tool with 'generate'. -->

# IterationSettings

```csharp
public sealed class IterationSettings
```

Namespace `SharpCell` · package `SharpCell`

Iterative calculation, Excel's "Enable iterative calculation": circular references are calculated over and over until they settle, instead of giving 0.

## Constructors

<a id="ctor-bool-int-double"></a>
### IterationSettings(bool, int, double)

```csharp
public IterationSettings(bool Enabled = false, int MaxIterations = 100, double MaxChange = 0.001)
```

Settings for iterative calculation; the defaults are Excel's, with iteration off.

**Parameters**

- `Enabled`: Whether circular references are calculated iteratively.
- `MaxIterations`: The most passes over a circular reference, 1 to 32,767.
- `MaxChange`: A circular reference has settled when no value of it changed by more than this in a pass; 0 or more.

**Exceptions**

- `ArgumentOutOfRangeException`: A limit is outside what Excel allows.

## Properties

<a id="enabled"></a>
### Enabled

```csharp
public bool Enabled { get; }
```

Whether circular references are calculated iteratively.

<a id="maxchange"></a>
### MaxChange

```csharp
public double MaxChange { get; }
```

A circular reference has settled when no value changed by more than this in a pass; 0.001 by default.

<a id="maxiterations"></a>
### MaxIterations

```csharp
public int MaxIterations { get; }
```

The most passes over a circular reference; 100 by default.

## Methods

<a id="equals-iterationsettings"></a>
### Equals(IterationSettings)

```csharp
public bool Equals(IterationSettings? other)
```

Whether the other settings are the same.

<a id="equals-object"></a>
### Equals(object)

```csharp
public override bool Equals(object? obj)
```

Whether `obj` is the same settings.

<a id="gethashcode"></a>
### GetHashCode()

```csharp
public override int GetHashCode()
```

A hash code consistent with [IterationSettings.Equals](SharpCell.IterationSettings.md#equals-iterationsettings).

<a id="tostring"></a>
### ToString()

```csharp
public override string ToString()
```

The settings as text, such as `Enabled, 100 iterations, change 0.001`.
