# OpcNodeValuePair Members

> Reference: Defines a node value pair using an IOpcNodeValue object as the node and an object as the value.

<dl class="api-definition">
<dt>Type</dt>
<dd><a href="./">OpcNodeValuePair</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 [ValueType](https://learn.microsoft.com/dotnet/api/system.valuetype).

## Constructors

### OpcNodeValuePair

Initializes a new instance of the [OpcNodeValuePair](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodevaluepair/) structure using the specified `node` and `value`.

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

```csharp
public OpcNodeValuePair(IOpcNodeValue node, object value)
```

</div>

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

```vbnet
Public Sub New(node As IOpcNodeValue, value As Object)
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `node` | [IOpcNodeValue](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.iopcnodevalue/) | The [IOpcNodeValue](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.iopcnodevalue/) object used to identify the node. |
| `value` | [Object](https://learn.microsoft.com/dotnet/api/system.object) | The [object](https://learn.microsoft.com/dotnet/api/system.object) representing the value. |

**Exceptions**

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

## Properties

### Node

Gets the [IOpcNodeValue](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.iopcnodevalue/) used to identify the node.

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

```csharp
public readonly IOpcNodeValue Node { get; }
```

</div>

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

```vbnet
Public ReadOnly Property Node As IOpcNodeValue
```

</div>

**Property value**

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

An object implementing the [IOpcNodeValue](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.iopcnodevalue/) interface.

### Value

Gets the value associated with the [Node](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodevaluepair/members#node).

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

```csharp
public readonly object Value { get; }
```

</div>

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

```vbnet
Public ReadOnly Property Value As Object
```

</div>

**Property value**

[Object](https://learn.microsoft.com/dotnet/api/system.object)

An [object](https://learn.microsoft.com/dotnet/api/system.object) used as the value in [OpcNodeValuePair](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodevaluepair/).

## Methods

### Deconstruct

Deconstructs the [OpcNodeValuePair](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodevaluepair/) into the [Node](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodevaluepair/members#node) and the [Value](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodevaluepair/members#value) used.

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

```csharp
public void Deconstruct(out IOpcNodeValue node, out object value)
```

</div>

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

```vbnet
Public Sub Deconstruct(node As IOpcNodeValue, value As Object)
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `node` | out [IOpcNodeValue](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.iopcnodevalue/) | The [Node](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodevaluepair/members#node) of the [OpcNodeValuePair](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodevaluepair/). |
| `value` | out [Object](https://learn.microsoft.com/dotnet/api/system.object) | The [Value](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodevaluepair/members#value) of the [OpcNodeValuePair](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodevaluepair/). |

### ToString

<span class="api-meta">override</span>

Returns a [string](https://learn.microsoft.com/dotnet/api/system.string) representing the [Node](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodevaluepair/members#node) and [Value](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodevaluepair/members#value) of the current [OpcNodeValuePair](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodevaluepair/).

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

```csharp
public override string ToString()
```

</div>

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

```vbnet
Public Overrides Function ToString() As String
```

</div>

**Returns**

[String](https://learn.microsoft.com/dotnet/api/system.string)

A [string](https://learn.microsoft.com/dotnet/api/system.string) representing the [Node](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodevaluepair/members#node) and [Value](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodevaluepair/members#value) of the current [OpcDataTypeInfo](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcdatatypeinfo/).

**Overrides**

[ToString()](https://learn.microsoft.com/dotnet/api/system.valuetype.tostring)
