# OpcClientStateChangedEventArgs Members

> Reference: Provides the event data for the StateChanged event.

<dl class="api-definition">
<dt>Type</dt>
<dd><a href="./">OpcClientStateChangedEventArgs</a></dd>
<dt>Namespace</dt>
<dd><a href="../namespaces/opc.uafx.client">Opc.UaFx.Client</a></dd>
<dt>Assembly</dt>
<dd>Opc.UaFx.Advanced.dll</dd>
<dt>Package</dt>
<dd>Opc.UaFx.Advanced v2.59.0</dd>
<dt>Also in</dt>
<dd>Opc.UaFx.Client</dd>
</dl>

Inherits members from [EventArgs](https://learn.microsoft.com/dotnet/api/system.eventargs).

## Constructors

### OpcClientStateChangedEventArgs

Initializes a new instance of the [OpcClientStateChangedEventArgs](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcclientstatechangedeventargs/) class using the specified `oldState` and `newState`.

<div class="api-signature" data-lang="csharp">

```csharp
public OpcClientStateChangedEventArgs(
    OpcClientState oldState,
    OpcClientState newState)
```

</div>

<div class="api-signature" data-lang="vbnet">

```vbnet
Public Sub New(oldState As OpcClientState, newState As OpcClientState)
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `oldState` | [OpcClientState](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcclientstate/) | The state before the change. |
| `newState` | [OpcClientState](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcclientstate/) | The state after the change. |

## Properties

### NewState

Gets the state after the change.

<div class="api-signature" data-lang="csharp">

```csharp
public OpcClientState NewState { get; }
```

</div>

<div class="api-signature" data-lang="vbnet">

```vbnet
Public ReadOnly Property NewState As OpcClientState
```

</div>

**Property value**

[OpcClientState](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcclientstate/)

The [OpcClientState](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcclientstate/) after the change.

### OldState

Gets the state before the change.

<div class="api-signature" data-lang="csharp">

```csharp
public OpcClientState OldState { get; }
```

</div>

<div class="api-signature" data-lang="vbnet">

```vbnet
Public ReadOnly Property OldState As OpcClientState
```

</div>

**Property value**

[OpcClientState](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcclientstate/)

The [OpcClientState](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcclientstate/) before the change.
