# OpcSubscriptionEventArgs Members

> Reference: Provides the event data for the SubscriptionCreated and SubscriptionDeleted event.

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

### OpcSubscriptionEventArgs

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

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

```csharp
public OpcSubscriptionEventArgs(OpcSubscription subscription)
```

</div>

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

```vbnet
Public Sub New(subscription As OpcSubscription)
```

</div>

**Parameters**

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

**Exceptions**

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

## Properties

### Subscription

Gets the [OpcSubscription](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.server.opcsubscription/) instances affected by the event.

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

```csharp
public OpcSubscription Subscription { get; }
```

</div>

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

```vbnet
Public ReadOnly Property Subscription As OpcSubscription
```

</div>

**Property value**

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

An instance of the [OpcSubscription](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.server.opcsubscription/) class.
