# OpcNotification Members

> Reference: Represents a notification message a client received for a subscription, as defined by the NotificationMessage of OPC UA.

<dl class="api-definition">
<dt>Type</dt>
<dd><a href="./">OpcNotification</a></dd>
<dt>Namespace</dt>
<dd><a href="../namespaces/opc.uafx">Opc.UaFx</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>

## Properties

### Data

Gets the data sets of the notification.

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

```csharp
public OpcNotificationDataSetReadOnlyCollection Data { get; }
```

</div>

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

```vbnet
Public ReadOnly Property Data As OpcNotificationDataSetReadOnlyCollection
```

</div>

**Property value**

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

A read-only collection of the [OpcDataChangeDataSet](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcdatachangedataset/) and [OpcEventDataSet](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opceventdataset/) instances of the notification.

**Remarks**

Notifications of other kinds, e.g. status change notifications, are not part of the collection.

### PublishTime

Gets the time the server sent the notification.

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

```csharp
public DateTime? PublishTime { get; }
```

</div>

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

```vbnet
Public ReadOnly Property PublishTime As Date?
```

</div>

**Property value**

[Nullable](https://learn.microsoft.com/dotnet/api/system.nullable-1)&lt;[DateTime](https://learn.microsoft.com/dotnet/api/system.datetime)&gt;

The time the server sent the notification, or a null reference (Nothing in Visual Basic) if it is not known.

### SequenceNumber

Gets the sequence number of the notification.

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

```csharp
public long SequenceNumber { get; }
```

</div>

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

```vbnet
Public ReadOnly Property SequenceNumber As Long
```

</div>

**Property value**

[Int64](https://learn.microsoft.com/dotnet/api/system.int64)

The number which the server assigned to the notification within the subscription.

## Methods

### GetDataChanges

Retrieves the data changes of all [OpcDataChangeDataSet](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcdatachangedataset/) instances of the notification.

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

```csharp
public IEnumerable<OpcDataChangeDataSetItem> GetDataChanges()
```

</div>

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

```vbnet
Public Function GetDataChanges() As IEnumerable(Of OpcDataChangeDataSetItem)
```

</div>

**Returns**

[IEnumerable](https://learn.microsoft.com/dotnet/api/system.collections.generic.ienumerable-1)&lt;[OpcDataChangeDataSetItem](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcdatachangedatasetitem/)&gt;

A sequence of the [OpcDataChangeDataSetItem](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcdatachangedatasetitem/) instances of the notification.

### GetEvents

Retrieves the events of all [OpcEventDataSet](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opceventdataset/) instances of the notification.

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

```csharp
public IEnumerable<OpcEventDataSetItem> GetEvents()
```

</div>

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

```vbnet
Public Function GetEvents() As IEnumerable(Of OpcEventDataSetItem)
```

</div>

**Returns**

[IEnumerable](https://learn.microsoft.com/dotnet/api/system.collections.generic.ienumerable-1)&lt;[OpcEventDataSetItem](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opceventdatasetitem/)&gt;

A sequence of the [OpcEventDataSetItem](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opceventdatasetitem/) instances of the notification.
