# OpcEventTypeAttribute Members

> Reference: Defines the identifier of a custom event type which is represented by the Type on that this attribute is applied.

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

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

## Constructors

### OpcEventTypeAttribute

<span class="api-meta">13 overloads</span>

| Overload | Description |
|---|---|
| [OpcEventTypeAttribute(Type)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opceventtypeattribute/members#opceventtypeattribute-system-type) | Initializes a new instance of the [OpcEventTypeAttribute](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opceventtypeattribute/) class using the specified `type`. |
| [OpcEventTypeAttribute(byte\[\])](#opceventtypeattribute-system-byte-array)<span class="api-meta">since v2.8</span> | Initializes a new instance of the [OpcEventTypeAttribute](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opceventtypeattribute/) class using the `id` to use to identify the according event type node. |
| [OpcEventTypeAttribute(byte\[\], int)](#opceventtypeattribute-system-byte-array-system-int32)<span class="api-meta">since v2.8</span> | Initializes a new instance of the [OpcEventTypeAttribute](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opceventtypeattribute/) class using the `id` and `namespaceIndex` to use to identify the according event type node. |
| [OpcEventTypeAttribute(byte\[\], string)](#opceventtypeattribute-system-byte-array-system-string)<span class="api-meta">since v2.8</span> | Initializes a new instance of the [OpcEventTypeAttribute](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opceventtypeattribute/) class using the `id` and `namespaceUri` specified to use to identify the according event type node. |
| [OpcEventTypeAttribute(int)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opceventtypeattribute/members#opceventtypeattribute-system-int32)<span class="api-meta">since v2.8</span> | Initializes a new instance of the [OpcEventTypeAttribute](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opceventtypeattribute/) class using the `id` to use to identify the according event type node. |
| [OpcEventTypeAttribute(int, int)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opceventtypeattribute/members#opceventtypeattribute-system-int32-system-int32)<span class="api-meta">since v2.8</span> | Initializes a new instance of the [OpcEventTypeAttribute](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opceventtypeattribute/) class using the `id` and `namespaceIndex` to use to identify the according event type node. |
| [OpcEventTypeAttribute(int, string)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opceventtypeattribute/members#opceventtypeattribute-system-int32-system-string)<span class="api-meta">since v2.8</span> | Initializes a new instance of the [OpcEventTypeAttribute](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opceventtypeattribute/) class using the `id` and `namespaceUri` specified to use to identify the according event type node. |
| [OpcEventTypeAttribute(uint)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opceventtypeattribute/members#opceventtypeattribute-system-uint32)<span class="api-meta">since v2.8</span> | Initializes a new instance of the [OpcEventTypeAttribute](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opceventtypeattribute/) class using the `id` to use to identify the according event type node. |
| [OpcEventTypeAttribute(uint, int)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opceventtypeattribute/members#opceventtypeattribute-system-uint32-system-int32)<span class="api-meta">since v2.8</span> | Initializes a new instance of the [OpcEventTypeAttribute](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opceventtypeattribute/) class using the `id` and `namespaceIndex` to use to identify the according event type node. |
| [OpcEventTypeAttribute(uint, string)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opceventtypeattribute/members#opceventtypeattribute-system-uint32-system-string)<span class="api-meta">since v2.8</span> | Initializes a new instance of the [OpcEventTypeAttribute](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opceventtypeattribute/) class using the `id` and `namespaceUri` specified to use to identify the according event type node. |
| [OpcEventTypeAttribute(string)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opceventtypeattribute/members#opceventtypeattribute-system-string)<span class="api-meta">since v2.8</span> | Initializes a new instance of the [OpcEventTypeAttribute](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opceventtypeattribute/) class using the `id` to use to identify the according event type node. |
| [OpcEventTypeAttribute(string, int)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opceventtypeattribute/members#opceventtypeattribute-system-string-system-int32)<span class="api-meta">since v2.8</span> | Initializes a new instance of the [OpcEventTypeAttribute](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opceventtypeattribute/) class using the `id` and `namespaceIndex` to use to identify the according event type node. |
| [OpcEventTypeAttribute(string, string)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opceventtypeattribute/members#opceventtypeattribute-system-string-system-string)<span class="api-meta">since v2.8</span> | Initializes a new instance of the [OpcEventTypeAttribute](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opceventtypeattribute/) class using the `id` and `namespaceUri` specified to use to identify the according event type node. |

#### OpcEventTypeAttribute(Type)

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

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

```csharp
public OpcEventTypeAttribute(Type type)
```

</div>

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

```vbnet
Public Sub New(type As Type)
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `type` | [Type](https://learn.microsoft.com/dotnet/api/system.type) | The type of [OpcEvent](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcevent/) produced when calling 'Opc.UaFx.OpcEventNode.CreateEvent(OpcContext)'. |

#### OpcEventTypeAttribute(byte\[\])

<span class="api-meta">since v2.8</span>

Initializes a new instance of the [OpcEventTypeAttribute](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opceventtypeattribute/) class using the `id` to use to identify the according event type node.

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

```csharp
public OpcEventTypeAttribute(byte[] id)
```

</div>

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

```vbnet
Public Sub New(id As Byte())
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `id` | [Byte](https://learn.microsoft.com/dotnet/api/system.byte)[] | The opaque value of the event type node. |

#### OpcEventTypeAttribute(byte\[\], int)

<span class="api-meta">since v2.8</span>

Initializes a new instance of the [OpcEventTypeAttribute](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opceventtypeattribute/) class using the `id` and `namespaceIndex` to use to identify the according event type node.

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

```csharp
public OpcEventTypeAttribute(byte[] id, int namespaceIndex)
```

</div>

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

```vbnet
Public Sub New(id As Byte(), namespaceIndex As Integer)
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `id` | [Byte](https://learn.microsoft.com/dotnet/api/system.byte)[] | The opaque value of the event type node. |
| `namespaceIndex` | [Int32](https://learn.microsoft.com/dotnet/api/system.int32) | The index of the namespace to that the event type node belongs. |

#### OpcEventTypeAttribute(byte\[\], string)

<span class="api-meta">since v2.8</span>

Initializes a new instance of the [OpcEventTypeAttribute](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opceventtypeattribute/) class using the `id` and `namespaceUri` specified to use to identify the according event type node.

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

```csharp
public OpcEventTypeAttribute(byte[] id, string namespaceUri)
```

</div>

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

```vbnet
Public Sub New(id As Byte(), namespaceUri As String)
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `id` | [Byte](https://learn.microsoft.com/dotnet/api/system.byte)[] | The opaque value of the event type node. |
| `namespaceUri` | [String](https://learn.microsoft.com/dotnet/api/system.string) | The namespace URI that the [Id](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opceventtypeattribute/members#id) should refer to. |

#### OpcEventTypeAttribute(int)

<span class="api-meta">since v2.8</span>

Initializes a new instance of the [OpcEventTypeAttribute](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opceventtypeattribute/) class using the `id` to use to identify the according event type node.

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

```csharp
public OpcEventTypeAttribute(int id)
```

</div>

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

```vbnet
Public Sub New(id As Integer)
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `id` | [Int32](https://learn.microsoft.com/dotnet/api/system.int32) | The numeric identifier of the event type node. |

#### OpcEventTypeAttribute(int, int)

<span class="api-meta">since v2.8</span>

Initializes a new instance of the [OpcEventTypeAttribute](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opceventtypeattribute/) class using the `id` and `namespaceIndex` to use to identify the according event type node.

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

```csharp
public OpcEventTypeAttribute(int id, int namespaceIndex)
```

</div>

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

```vbnet
Public Sub New(id As Integer, namespaceIndex As Integer)
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `id` | [Int32](https://learn.microsoft.com/dotnet/api/system.int32) | The numeric identifier of the event type node. |
| `namespaceIndex` | [Int32](https://learn.microsoft.com/dotnet/api/system.int32) | The index of the namespace to that the event type node belongs. |

#### OpcEventTypeAttribute(int, string)

<span class="api-meta">since v2.8</span>

Initializes a new instance of the [OpcEventTypeAttribute](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opceventtypeattribute/) class using the `id` and `namespaceUri` specified to use to identify the according event type node.

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

```csharp
public OpcEventTypeAttribute(int id, string namespaceUri)
```

</div>

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

```vbnet
Public Sub New(id As Integer, namespaceUri As String)
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `id` | [Int32](https://learn.microsoft.com/dotnet/api/system.int32) | The numeric identifier of the event type node. |
| `namespaceUri` | [String](https://learn.microsoft.com/dotnet/api/system.string) | The namespace URI that the [Id](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opceventtypeattribute/members#id) should refer to. |

#### OpcEventTypeAttribute(uint)

<span class="api-meta">since v2.8</span>

Initializes a new instance of the [OpcEventTypeAttribute](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opceventtypeattribute/) class using the `id` to use to identify the according event type node.

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

```csharp
public OpcEventTypeAttribute(uint id)
```

</div>

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

```vbnet
Public Sub New(id As UInteger)
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `id` | [UInt32](https://learn.microsoft.com/dotnet/api/system.uint32) | The numeric identifier of the event type node. |

#### OpcEventTypeAttribute(uint, int)

<span class="api-meta">since v2.8</span>

Initializes a new instance of the [OpcEventTypeAttribute](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opceventtypeattribute/) class using the `id` and `namespaceIndex` to use to identify the according event type node.

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

```csharp
public OpcEventTypeAttribute(uint id, int namespaceIndex)
```

</div>

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

```vbnet
Public Sub New(id As UInteger, namespaceIndex As Integer)
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `id` | [UInt32](https://learn.microsoft.com/dotnet/api/system.uint32) | The numeric identifier of the event type node. |
| `namespaceIndex` | [Int32](https://learn.microsoft.com/dotnet/api/system.int32) | The index of the namespace to that the event type node belongs. |

#### OpcEventTypeAttribute(uint, string)

<span class="api-meta">since v2.8</span>

Initializes a new instance of the [OpcEventTypeAttribute](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opceventtypeattribute/) class using the `id` and `namespaceUri` specified to use to identify the according event type node.

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

```csharp
public OpcEventTypeAttribute(uint id, string namespaceUri)
```

</div>

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

```vbnet
Public Sub New(id As UInteger, namespaceUri As String)
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `id` | [UInt32](https://learn.microsoft.com/dotnet/api/system.uint32) | The numeric identifier of the event type node. |
| `namespaceUri` | [String](https://learn.microsoft.com/dotnet/api/system.string) | The namespace URI that the [Id](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opceventtypeattribute/members#id) should refer to. |

#### OpcEventTypeAttribute(string)

<span class="api-meta">since v2.8</span>

Initializes a new instance of the [OpcEventTypeAttribute](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opceventtypeattribute/) class using the `id` to use to identify the according event type node.

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

```csharp
public OpcEventTypeAttribute(string id)
```

</div>

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

```vbnet
Public Sub New(id As String)
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `id` | [String](https://learn.microsoft.com/dotnet/api/system.string) | The textual identifier of the event type node. |

#### OpcEventTypeAttribute(string, int)

<span class="api-meta">since v2.8</span>

Initializes a new instance of the [OpcEventTypeAttribute](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opceventtypeattribute/) class using the `id` and `namespaceIndex` to use to identify the according event type node.

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

```csharp
public OpcEventTypeAttribute(string id, int namespaceIndex)
```

</div>

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

```vbnet
Public Sub New(id As String, namespaceIndex As Integer)
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `id` | [String](https://learn.microsoft.com/dotnet/api/system.string) | The textual identifier of the event type node. |
| `namespaceIndex` | [Int32](https://learn.microsoft.com/dotnet/api/system.int32) | The index of the namespace to that the event type node belongs. |

#### OpcEventTypeAttribute(string, string)

<span class="api-meta">since v2.8</span>

Initializes a new instance of the [OpcEventTypeAttribute](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opceventtypeattribute/) class using the `id` and `namespaceUri` specified to use to identify the according event type node.

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

```csharp
public OpcEventTypeAttribute(string id, string namespaceUri)
```

</div>

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

```vbnet
Public Sub New(id As String, namespaceUri As String)
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `id` | [String](https://learn.microsoft.com/dotnet/api/system.string) | The textual identifier of the event type node. |
| `namespaceUri` | [String](https://learn.microsoft.com/dotnet/api/system.string) | The namespace URI that the [Id](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opceventtypeattribute/members#id) should refer to. |

## Properties

### Id

<span class="api-meta">since v2.8</span>

Gets the node identifier used to define the event type node of the [Type](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opceventtypeattribute/members#type) to that the attribute has been applied.

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

```csharp
public OpcNodeId Id { get; }
```

</div>

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

```vbnet
Public ReadOnly Property Id As OpcNodeId
```

</div>

**Property value**

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

An instance of the [OpcNodeId](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeid/) which identifies the event type node of the [Type](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opceventtypeattribute/members#type) to that the attribute has been applied.

### Type

Gets the [Type](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opceventtypeattribute/members#type) of [OpcEvent](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcevent/) produced by the attribute owner.

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

```csharp
public Type Type { get; set; }
```

</div>

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

```vbnet
Public Property Type As Type
```

</div>

**Property value**

[Type](https://learn.microsoft.com/dotnet/api/system.type)

The type of [OpcEvent](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcevent/) produced by the 'Opc.UaFx.OpcEventNode' to which this [OpcEventTypeAttribute](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opceventtypeattribute/) belongs.
