# OpcServerStateChangedEventArgs Members

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

<dl class="api-definition">
<dt>Type</dt>
<dd><a href="./">OpcServerStateChangedEventArgs</a></dd>
<dt>Namespace</dt>
<dd><a href="../namespaces/opc.uafx.server">Opc.UaFx.Server</a></dd>
<dt>Assembly</dt>
<dd>Opc.UaFx.Advanced.dll</dd>
<dt>Package</dt>
<dd>Opc.UaFx.Advanced v2.59.0</dd>
</dl>

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

## Constructors

### OpcServerStateChangedEventArgs

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

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

```csharp
public OpcServerStateChangedEventArgs(
    OpcServerState oldState,
    OpcServerState newState)
```

</div>

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

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

</div>

**Parameters**

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

## Properties

### NewState

Gets the state after the change.

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

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

</div>

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

```vbnet
Public ReadOnly Property NewState As OpcServerState
```

</div>

**Property value**

[OpcServerState](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.server.opcserverstate/)

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

### OldState

Gets the state before the change.

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

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

</div>

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

```vbnet
Public ReadOnly Property OldState As OpcServerState
```

</div>

**Property value**

[OpcServerState](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.server.opcserverstate/)

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