# OpcSessionEventArgs Members

> Reference: Provides the event data of the events related to an OpcSession.

<dl class="api-definition">
<dt>Type</dt>
<dd><a href="./">OpcSessionEventArgs</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

### OpcSessionEventArgs

Initializes a new instance of the [OpcSessionEventArgs](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.server.opcsessioneventargs/) class using the `session` specified.

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

```csharp
public OpcSessionEventArgs(OpcSession session)
```

</div>

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

```vbnet
Public Sub New(session As OpcSession)
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `session` | [OpcSession](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.server.opcsession/) | The [OpcSession](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.server.opcsession/) affected by the event. |

**Exceptions**

| Exception | Condition |
|---|---|
| [ArgumentNullException](https://learn.microsoft.com/dotnet/api/system.argumentnullexception) | The `session` is a null reference (Nothing in Visual Basic). |

## Properties

### Session

Gets the session affected by the event.

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

```csharp
public OpcSession Session { get; }
```

</div>

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

```vbnet
Public ReadOnly Property Session As OpcSession
```

</div>

**Property value**

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

The [OpcSession](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.server.opcsession/) affected by the event.
