> ## Documentation Index
> Fetch the complete documentation index at: https://developer.synopsys.com/llms.txt
> Use this file to discover all available pages before exploring further.

# MaxGenerationsException Class

**Namespace:** `Phoenix.Optimization`

## Overview

The maximum number of generations was reached before an optimimum value was found.

## Inheritance

![MaxGenerationsException](https://mintcdn.com/synopsys-00a47cbc/Srh1_f--TdKCLyqD/docs/modelcenter/modelcenter-custom-optimization-algorithm-sdk/2026-r1/api/graphics/class_phoenix_1_1_optimization_1_1_max_generations_exception.png?fit=max\&auto=format\&n=Srh1_f--TdKCLyqD\&q=85\&s=0eaf1fbd91d6ff875098397f657b0782)

## Declaration

```csharp theme={null}
class MaxGenerationsException
```

## Description

The maximum number of generations was reached before an optimimum value was found.

## Public Member Functions

| Type | Name | Description |
| - | - | - |
| | `MaxGenerationsException ()` | Initializes a new instance of the MaxGenerationsException class. |
| | `MaxGenerationsException (string msg)` | Initializes a new instance of the MaxGenerationsException class with a specified error message. |
| | `MaxGenerationsException (string msg, Exception inner)` | Initializes a new instance of the MaxGenerationsException class with a specified error message and a reference to the inner exception that is the cause of this exception. |

### Public Member Functions inherited from [EarlyTerminationException]()

| Type | Name | Description |
| - | - | - |
| | `EarlyTerminationException ()` | Initializes a new instance of the EarlyTerminationException class. |
| | `EarlyTerminationException (string msg)` | Initializes a new instance of the EarlyTerminationException class with a specified error message. |
| | `EarlyTerminationException (string msg, Exception inner)` | Initializes a new instance of the EarlyTerminationException class with a specified error message and a reference to the inner exception that is the cause of this exception. |

### Public Member Functions inherited from [OptimizationException]()

| Type | Name | Description |
| - | - | - |
| | `OptimizationException ()` | Initializes a new instance of the OptimizationException class. |
| | `OptimizationException (string msg)` | Initializes a new instance of the OptimizationException class with a specified error message. |
| | `OptimizationException (string msg, Exception inner)` | Initializes a new instance of the OptimizationException class with a specified error message and a reference to the inner exception that is the cause of this exception. |

## Constructor & Destructor Documentation

### MaxGenerationsException()

```csharp theme={null}
MaxGenerationsException ( )
```

Initializes a new instance of the MaxGenerationsException class.

### MaxGenerationsException()

```csharp theme={null}
MaxGenerationsException ( string msg)
```

Initializes a new instance of the MaxGenerationsException class with a specified error message.

**Parameters:**

* `msg` - Message for the exception

### MaxGenerationsException()

```csharp theme={null}
MaxGenerationsException ( string msg, Exception inner )
```

Initializes a new instance of the MaxGenerationsException class with a specified error message and a reference to the inner exception that is the cause of this exception.

**Parameters:**

* `msg` - The error message that explains the reason for the exception.
* `inner` - The exception that is the cause of the current exception, or a null reference (Nothing in Visual Basic) if no inner exception is specified.

### MaxGenerationsException()

```csharp theme={null}
MaxGenerationsException ( `SerializationInfo` info, `StreamingContext` context )
```

Initializes a new instance of the MaxGenerationsException class with serialized data.

**Parameters:**

* `info` - The `SerializationInfo` that holds the serialized object data about the exception being thrown.
* `context` - The `StreamingContext` that contains contextual information about the source or destination.

## Property Documentation

### MaxGenerationsException()

```csharp theme={null}
MaxGenerationsException ( )
```

Initializes a new instance of the MaxGenerationsException class.

### MaxGenerationsException()

```csharp theme={null}
MaxGenerationsException ( string msg)
```

Initializes a new instance of the MaxGenerationsException class with a specified error message.

### MaxGenerationsException()

```csharp theme={null}
MaxGenerationsException ( string msg, Exception inner )
```

Initializes a new instance of the MaxGenerationsException class with a specified error message and a reference to the inner exception that is the cause of this exception.

### MaxGenerationsException()

```csharp theme={null}
MaxGenerationsException ( `SerializationInfo` info, `StreamingContext` context )
```

Initializes a new instance of the MaxGenerationsException class with serialized data.
