# OpcReadEventHistory Members

> Reference: Represents a command which defines a node whose event history is to be read using the ReadEventsHistory methods of the OpcClient.

<dl class="api-definition">
<dt>Type</dt>
<dd><a href="./">OpcReadEventHistory</a></dd>
<dt>Namespace</dt>
<dd><a href="../namespaces/opc.uafx.client">Opc.UaFx.Client</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 [OpcNodeServiceCommand](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.services.opcnodeservicecommand/members), [OpcServiceCommand](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.services.opcservicecommand/members).

## Constructors

### OpcReadEventHistory

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

| Overload | Description |
|---|---|
| [OpcReadEventHistory(OpcNodeId)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcreadeventhistory/members#opcreadeventhistory-opc-uafx-opcnodeid) | Initializes a new instance of the [OpcReadEventHistory](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcreadeventhistory/) class using the `nodeId` specified. |
| [OpcReadEventHistory(string)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcreadeventhistory/members#opcreadeventhistory-system-string) | Initializes a new instance of the [OpcReadEventHistory](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcreadeventhistory/) class using the `nodeId` specified. |
| [OpcReadEventHistory(int)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcreadeventhistory/members#opcreadeventhistory-system-int32) | Initializes a new instance of the [OpcReadEventHistory](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcreadeventhistory/) class using the `nodeId` specified. |
| [OpcReadEventHistory(string, int)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcreadeventhistory/members#opcreadeventhistory-system-string-system-int32) | Initializes a new instance of the [OpcReadEventHistory](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcreadeventhistory/) class using the `nodeId` and `namespaceIndex` specified. |
| [OpcReadEventHistory(int, int)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcreadeventhistory/members#opcreadeventhistory-system-int32-system-int32) | Initializes a new instance of the [OpcReadEventHistory](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcreadeventhistory/) class using the `nodeId` and `namespaceIndex` specified. |

#### OpcReadEventHistory(OpcNodeId)

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

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

```csharp
public OpcReadEventHistory(OpcNodeId nodeId)
```

</div>

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

```vbnet
Public Sub New(nodeId As OpcNodeId)
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `nodeId` | [OpcNodeId](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeid/) | The [OpcNodeId](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeid/) of the node whose event history is to be read. |

**Exceptions**

| Exception | Condition |
|---|---|
| [ArgumentException](https://learn.microsoft.com/dotnet/api/system.argumentexception) | The `nodeId` is a null identifier (see [IsNull](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeid/members#isnull)). |
| [ArgumentNullException](https://learn.microsoft.com/dotnet/api/system.argumentnullexception) | The `nodeId` is a null reference (Nothing in Visual Basic). |

#### OpcReadEventHistory(string)

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

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

```csharp
public OpcReadEventHistory(string nodeId)
```

</div>

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

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

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `nodeId` | [String](https://learn.microsoft.com/dotnet/api/system.string) | The textual node identifier of the node whose event history is to be read. |

**Exceptions**

| Exception | Condition |
|---|---|
| [ArgumentException](https://learn.microsoft.com/dotnet/api/system.argumentexception) | The `nodeId` is a null reference (Nothing in Visual Basic) or equals [Empty](https://learn.microsoft.com/dotnet/api/system.string.empty), which results in a null identifier (see [IsNull](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeid/members#isnull)). |
| [FormatException](https://learn.microsoft.com/dotnet/api/system.formatexception) | The `nodeId` is not a valid node identifier expression (see [Parse](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeid/members#parse)) and [AlwaysParseStringIdentifiers](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcautomatism/members#alwaysparsestringidentifiers) is false. |

#### OpcReadEventHistory(int)

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

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

```csharp
public OpcReadEventHistory(int nodeId)
```

</div>

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

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

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `nodeId` | [Int32](https://learn.microsoft.com/dotnet/api/system.int32) | The numeric node identifier of the node whose event history is to be read. |

**Exceptions**

| Exception | Condition |
|---|---|
| [ArgumentException](https://learn.microsoft.com/dotnet/api/system.argumentexception) | The node identifier specified by `nodeId` is a null identifier (see [IsNull](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeid/members#isnull)). |

#### OpcReadEventHistory(string, int)

Initializes a new instance of the [OpcReadEventHistory](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcreadeventhistory/) class using the `nodeId` and `namespaceIndex` specified.

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

```csharp
public OpcReadEventHistory(string nodeId, int namespaceIndex)
```

</div>

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

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

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `nodeId` | [String](https://learn.microsoft.com/dotnet/api/system.string) | The textual node identifier of the node whose event history is to be read. |
| `namespaceIndex` | [Int32](https://learn.microsoft.com/dotnet/api/system.int32) | The index of the namespace within that the node with the `nodeId` specified can be located. |

**Exceptions**

| Exception | Condition |
|---|---|
| [ArgumentException](https://learn.microsoft.com/dotnet/api/system.argumentexception) | The node identifier specified by `nodeId` and `namespaceIndex` is a null identifier (see [IsNull](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeid/members#isnull)). |

#### OpcReadEventHistory(int, int)

Initializes a new instance of the [OpcReadEventHistory](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcreadeventhistory/) class using the `nodeId` and `namespaceIndex` specified.

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

```csharp
public OpcReadEventHistory(int nodeId, int namespaceIndex)
```

</div>

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

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

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `nodeId` | [Int32](https://learn.microsoft.com/dotnet/api/system.int32) | The numeric node identifier of the node whose event history is to be read. |
| `namespaceIndex` | [Int32](https://learn.microsoft.com/dotnet/api/system.int32) | The index of the namespace within that the node with the `nodeId` specified can be located. |

**Exceptions**

| Exception | Condition |
|---|---|
| [ArgumentException](https://learn.microsoft.com/dotnet/api/system.argumentexception) | The node identifier specified by `nodeId` and `namespaceIndex` is a null identifier (see [IsNull](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeid/members#isnull)). |
