# OpcNodeReference Members

> Reference: Defines a bunch of OpcReference instances associated with a specific node using its IOpcNode instance or a OpcNodeId to identify the belonging node the references are used for.

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

## Constructors

### OpcNodeReference

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

| Overload | Description |
|---|---|
| [OpcNodeReference(IOpcNode)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodereference/members#opcnodereference-opc-uafx-iopcnode)<span class="api-meta">since v2.7</span> | Initializes a new instance of the [OpcNodeReference](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodereference/) class using the `node` specified. |
| [OpcNodeReference(IOpcNode, IEnumerable&lt;OpcReference&gt;)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodereference/members#opcnodereference-opc-uafx-iopcnode-system-collections-generic-ienumerable-of-opc-uafx-opcreference)<span class="api-meta">since v2.7</span> | Initializes a new instance of the [OpcNodeReference](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodereference/) class using the `node` and its `references` specified. |
| [OpcNodeReference(IOpcNode, params OpcReference\[\])](#opcnodereference-opc-uafx-iopcnode-opc-uafx-opcreference-array)<span class="api-meta">since v2.7</span> | Initializes a new instance of the [OpcNodeReference](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodereference/) class using the `node` and its `references` specified. |
| [OpcNodeReference(OpcNodeId)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodereference/members#opcnodereference-opc-uafx-opcnodeid) | Initializes a new instance of the [OpcNodeReference](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodereference/) class using the `nodeId` specified. |
| [OpcNodeReference(OpcNodeId, IEnumerable&lt;OpcReference&gt;)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodereference/members#opcnodereference-opc-uafx-opcnodeid-system-collections-generic-ienumerable-of-opc-uafx-opcreference) | Initializes a new instance of the [OpcNodeReference](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodereference/) class using the `nodeId` and its node specific `references` specified. |
| [OpcNodeReference(OpcNodeId, params OpcReference\[\])](#opcnodereference-opc-uafx-opcnodeid-opc-uafx-opcreference-array) | Initializes a new instance of the [OpcNodeReference](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodereference/) class using the `nodeId` and its node specific `references` specified. |

#### OpcNodeReference(IOpcNode)

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

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

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

```csharp
public OpcNodeReference(IOpcNode node)
```

</div>

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

```vbnet
Public Sub New(node As IOpcNode)
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `node` | [IOpcNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.iopcnode/) | The [IOpcNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.iopcnode/) instance its references are organized by the new [OpcNodeReference](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodereference/). |

**Exceptions**

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

#### OpcNodeReference(IOpcNode, IEnumerable&lt;OpcReference&gt;)

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

Initializes a new instance of the [OpcNodeReference](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodereference/) class using the `node` and its `references` specified.

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

```csharp
public OpcNodeReference(IOpcNode node, IEnumerable<OpcReference> references)
```

</div>

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

```vbnet
Public Sub New(node As IOpcNode, references As IEnumerable(Of OpcReference))
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `node` | [IOpcNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.iopcnode/) | The [IOpcNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.iopcnode/) instance its `references` are organized by the new [OpcNodeReference](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodereference/). |
| `references` | [IEnumerable](https://learn.microsoft.com/dotnet/api/system.collections.generic.ienumerable-1)&lt;[OpcReference](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcreference/)&gt; | A sequence of [OpcReference](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcreference/) instances belonging to the `node`. |

**Exceptions**

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

#### OpcNodeReference(IOpcNode, params OpcReference\[\])

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

Initializes a new instance of the [OpcNodeReference](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodereference/) class using the `node` and its `references` specified.

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

```csharp
public OpcNodeReference(IOpcNode node, params OpcReference[] references)
```

</div>

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

```vbnet
Public Sub New(node As IOpcNode, ParamArray references As OpcReference())
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `node` | [IOpcNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.iopcnode/) | The [IOpcNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.iopcnode/) instance its `references` are organized by the new [OpcNodeReference](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodereference/). |
| `references` | params [OpcReference](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcreference/)[] | An array of [OpcReference](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcreference/) instances belonging to the `node`. |

**Exceptions**

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

#### OpcNodeReference(OpcNodeId)

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

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

```csharp
public OpcNodeReference(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/) which identifies the node its references are organized by the new [OpcNodeReference](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodereference/). |

**Exceptions**

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

#### OpcNodeReference(OpcNodeId, IEnumerable&lt;OpcReference&gt;)

Initializes a new instance of the [OpcNodeReference](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodereference/) class using the `nodeId` and its node specific `references` specified.

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

```csharp
public OpcNodeReference(OpcNodeId nodeId, IEnumerable<OpcReference> references)
```

</div>

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

```vbnet
Public Sub New(nodeId As OpcNodeId, references As IEnumerable(Of OpcReference))
```

</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/) which identifies the node its `references` are organized by the new [OpcNodeReference](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodereference/). |
| `references` | [IEnumerable](https://learn.microsoft.com/dotnet/api/system.collections.generic.ienumerable-1)&lt;[OpcReference](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcreference/)&gt; | A sequence of [OpcReference](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcreference/) instances belonging to the `nodeId`. |

**Exceptions**

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

#### OpcNodeReference(OpcNodeId, params OpcReference\[\])

Initializes a new instance of the [OpcNodeReference](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodereference/) class using the `nodeId` and its node specific `references` specified.

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

```csharp
public OpcNodeReference(OpcNodeId nodeId, params OpcReference[] references)
```

</div>

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

```vbnet
Public Sub New(nodeId As OpcNodeId, ParamArray references As OpcReference())
```

</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/) which identifies the node its `references` are organized by the new [OpcNodeReference](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodereference/). |
| `references` | params [OpcReference](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcreference/)[] | An array of [OpcReference](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcreference/) instances belonging to the `nodeId`. |

**Exceptions**

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

## Properties

### Node

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

Gets the node to which the [References](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodereference/members#references) belong to.

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

```csharp
public IOpcNode Node { get; }
```

</div>

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

```vbnet
Public ReadOnly Property Node As IOpcNode
```

</div>

**Property value**

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

The [IOpcNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.iopcnode/) which is used as the source node of the [References](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodereference/members#references) or a null refernce (Nothing in Visual Basic) in case there this [OpcNodeReference](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodereference/) has been initialized using a [OpcNodeId](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeid/) which identifies the node the [References](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodereference/members#references) belong to.

### NodeId

Gets the identifier of the node to which the [References](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodereference/members#references) belong to.

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

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

</div>

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

```vbnet
Public ReadOnly Property NodeId As OpcNodeId
```

</div>

**Property value**

[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/) which identifies the node to which the [References](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodereference/members#references) belong to.

### References

Gets a collection of [OpcReference](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcreference/) instances which belong the node identified by the [NodeId](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodereference/members#nodeid) or refered to in the [Node](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodereference/members#node) property.

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

```csharp
public OpcReferenceCollection References { get; }
```

</div>

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

```vbnet
Public ReadOnly Property References As OpcReferenceCollection
```

</div>

**Property value**

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

An instance of the [OpcReferenceCollection](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcreferencecollection/) class which contains the [OpcReference](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcreference/) instances which belong to the node its references are maintained by this [OpcNodeReference](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodereference/).

## Methods

### From

<span class="api-meta">static · 2 overloads · since v2.7</span>

| Overload | Description |
|---|---|
| [From(OpcNodeId)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodereference/members#from-opc-uafx-opcnodeid)<span class="api-meta">static · since v2.7</span> | Provides a new [OpcNodeReferenceSource](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodereferencesource/) initialized with the `nodeId` specified to construct [OpcNodeReference](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodereference/) instances using the `nodeId` as the identifier of the source node for the subsequent defined [OpcNodeReference](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodereference/) instances. |
| [From(IOpcNode)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodereference/members#from-opc-uafx-iopcnode)<span class="api-meta">static · since v2.7</span> | Provides a new [OpcNodeReferenceSource](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodereferencesource/) initialized with the `node` specified to construct [OpcNodeReference](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodereference/) instances using the `node` as the source node for the subsequent defined [OpcNodeReference](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodereference/) instances. |

#### From(OpcNodeId)

<span class="api-meta">static · since v2.7</span>

Provides a new [OpcNodeReferenceSource](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodereferencesource/) initialized with the `nodeId` specified to construct [OpcNodeReference](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodereference/) instances using the `nodeId` as the identifier of the source node for the subsequent defined [OpcNodeReference](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodereference/) instances.

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

```csharp
public static OpcNodeReferenceSource From(OpcNodeId nodeId)
```

</div>

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

```vbnet
Public Shared Function From(nodeId As OpcNodeId) As OpcNodeReferenceSource
```

</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/) which identifies the node from which the references constructed originate from. |

**Returns**

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

A new instance of the [OpcNodeReferenceSource](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodereferencesource/) class initialized with the `nodeId` specified.

**Exceptions**

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

#### From(IOpcNode)

<span class="api-meta">static · since v2.7</span>

Provides a new [OpcNodeReferenceSource](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodereferencesource/) initialized with the `node` specified to construct [OpcNodeReference](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodereference/) instances using the `node` as the source node for the subsequent defined [OpcNodeReference](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodereference/) instances.

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

```csharp
public static OpcNodeReferenceSource From(IOpcNode node)
```

</div>

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

```vbnet
Public Shared Function From(node As IOpcNode) As OpcNodeReferenceSource
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `node` | [IOpcNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.iopcnode/) | The [IOpcNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.iopcnode/) from which the references constructed originate from. |

**Returns**

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

A new instance of the [OpcNodeReferenceSource](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodereferencesource/) class initialized with the `node` specified.

**Exceptions**

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

### To

<span class="api-meta">static · 6 overloads · since v2.7</span>

| Overload | Description |
|---|---|
| [To(IOpcNode)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodereference/members#to-opc-uafx-iopcnode)<span class="api-meta">static · since v2.7</span> | Provides a bidirectional reference using the `targetNode` as the target of the reference. |
| [To(IOpcNode, OpcReferenceType)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodereference/members#to-opc-uafx-iopcnode-opc-uafx-opcreferencetype)<span class="api-meta">static · since v2.7</span> | Provides a bidirectional reference using the `targetNode` as the target of the reference. |
| [To(IOpcNode, OpcNodeId)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodereference/members#to-opc-uafx-iopcnode-opc-uafx-opcnodeid)<span class="api-meta">static · since v2.7</span> | Provides a bidirectional reference using the `targetNode` as the target of the reference. |
| [To(OpcNodeId)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodereference/members#to-opc-uafx-opcnodeid)<span class="api-meta">static · since v2.7</span> | Provides a bidirectional reference using the `targetNodeId` as the identifier of the target of the reference. |
| [To(OpcNodeId, OpcReferenceType)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodereference/members#to-opc-uafx-opcnodeid-opc-uafx-opcreferencetype)<span class="api-meta">static · since v2.7</span> | Provides a bidirectional reference using the `targetNodeId` as the identifier of the target of the reference. |
| [To(OpcNodeId, OpcNodeId)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodereference/members#to-opc-uafx-opcnodeid-opc-uafx-opcnodeid)<span class="api-meta">static · since v2.7</span> | Provides a bidirectional reference using the `targetNodeId` as the identifier of target of the reference. |

#### To(IOpcNode)

<span class="api-meta">static · since v2.7</span>

Provides a bidirectional reference using the `targetNode` as the target of the reference. The reference created represents a [ParentToChild](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcreferencedirection/#parenttochild) and [ChildToParent](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcreferencedirection/#childtoparent) relation using [Organizes](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcreferencetype/#organizes) as the type of reference.

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

```csharp
public static OpcBidirectionalReference To(IOpcNode targetNode)
```

</div>

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

```vbnet
Public Shared Function [To](targetNode As IOpcNode) As OpcBidirectionalReference
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `targetNode` | [IOpcNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.iopcnode/) | The [IOpcNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.iopcnode/) in which the reference constructed ceases. |

**Returns**

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

A new instance of the [OpcBidirectionalReference](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcbidirectionalreference/) class initialized with the `targetNode` specified and setup using the [Organizes](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcreferencetype/#organizes) in a bidirectional manner.

**Exceptions**

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

#### To(IOpcNode, OpcReferenceType)

<span class="api-meta">static · since v2.7</span>

Provides a bidirectional reference using the `targetNode` as the target of the reference. The reference created represents a [ParentToChild](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcreferencedirection/#parenttochild) and [ChildToParent](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcreferencedirection/#childtoparent) relation using the `referenceType` as the type of reference.

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

```csharp
public static OpcBidirectionalReference To(
    IOpcNode targetNode,
    OpcReferenceType referenceType)
```

</div>

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

```vbnet
Public Shared Function [To](
    targetNode As IOpcNode,
    referenceType As OpcReferenceType) As OpcBidirectionalReference
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `targetNode` | [IOpcNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.iopcnode/) | The [IOpcNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.iopcnode/) in which the reference constructed ceases. |
| `referenceType` | [OpcReferenceType](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcreferencetype/) | One of the members defined by the [OpcReferenceType](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcreferencetype/) enumeration to use to setup the type of reference represented. |

**Returns**

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

A new instance of the [OpcBidirectionalReference](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcbidirectionalreference/) class initialized with the `targetNode` specified and setup using the `referenceType` passed in a bidirectional manner.

**Exceptions**

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

#### To(IOpcNode, OpcNodeId)

<span class="api-meta">static · since v2.7</span>

Provides a bidirectional reference using the `targetNode` as the target of the reference. The reference created represents a [ParentToChild](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcreferencedirection/#parenttochild) and [ChildToParent](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcreferencedirection/#childtoparent) relation using the type of reference identified by the `referenceTypeId` specified.

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

```csharp
public static OpcBidirectionalReference To(
    IOpcNode targetNode,
    OpcNodeId referenceTypeId)
```

</div>

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

```vbnet
Public Shared Function [To](
    targetNode As IOpcNode,
    referenceTypeId As OpcNodeId) As OpcBidirectionalReference
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `targetNode` | [IOpcNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.iopcnode/) | The [IOpcNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.iopcnode/) in which the reference constructed ceases. |
| `referenceTypeId` | [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/) which identifies the type of reference to represent between the `targetNode` and its opponent. |

**Returns**

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

A new instance of the [OpcBidirectionalReference](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcbidirectionalreference/) class initialized with the `targetNode` specified and setup using the `referenceTypeId` passed in a bidirectional manner.

**Exceptions**

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

#### To(OpcNodeId)

<span class="api-meta">static · since v2.7</span>

Provides a bidirectional reference using the `targetNodeId` as the identifier of the target of the reference. The reference created represents a [ParentToChild](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcreferencedirection/#parenttochild) and [ChildToParent](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcreferencedirection/#childtoparent) relation using [Organizes](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcreferencetype/#organizes) as the type of reference.

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

```csharp
public static OpcBidirectionalReference To(OpcNodeId targetNodeId)
```

</div>

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

```vbnet
Public Shared Function [To](
    targetNodeId As OpcNodeId) As OpcBidirectionalReference
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `targetNodeId` | [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/) which identifies the node in which the reference constructed ceases. |

**Returns**

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

A new instance of the [OpcBidirectionalReference](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcbidirectionalreference/) class initialized with the `targetNodeId` specified and setup using the [Organizes](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcreferencetype/#organizes) in a bidirectional manner.

**Exceptions**

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

#### To(OpcNodeId, OpcReferenceType)

<span class="api-meta">static · since v2.7</span>

Provides a bidirectional reference using the `targetNodeId` as the identifier of the target of the reference. The reference created represents a [ParentToChild](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcreferencedirection/#parenttochild) and [ChildToParent](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcreferencedirection/#childtoparent) relation using the `referenceType` as the type of reference.

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

```csharp
public static OpcBidirectionalReference To(
    OpcNodeId targetNodeId,
    OpcReferenceType referenceType)
```

</div>

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

```vbnet
Public Shared Function [To](
    targetNodeId As OpcNodeId,
    referenceType As OpcReferenceType) As OpcBidirectionalReference
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `targetNodeId` | [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/) which identifies the node in which the reference constructed ceases. |
| `referenceType` | [OpcReferenceType](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcreferencetype/) | One of the members defined by the [OpcReferenceType](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcreferencetype/) enumeration to use to setup the type of reference represented. |

**Returns**

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

A new instance of the [OpcBidirectionalReference](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcbidirectionalreference/) class initialized with the `targetNodeId` specified and setup using the `referenceType` passed in a bidirectional manner.

**Exceptions**

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

#### To(OpcNodeId, OpcNodeId)

<span class="api-meta">static · since v2.7</span>

Provides a bidirectional reference using the `targetNodeId` as the identifier of target of the reference. The reference created represents a [ParentToChild](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcreferencedirection/#parenttochild) and [ChildToParent](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcreferencedirection/#childtoparent) relation using the type of reference identified by the `referenceTypeId` specified.

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

```csharp
public static OpcBidirectionalReference To(
    OpcNodeId targetNodeId,
    OpcNodeId referenceTypeId)
```

</div>

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

```vbnet
Public Shared Function [To](
    targetNodeId As OpcNodeId,
    referenceTypeId As OpcNodeId) As OpcBidirectionalReference
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `targetNodeId` | [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/) which identifies the node in which the reference constructed ceases. |
| `referenceTypeId` | [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/) which identifies the type of reference to represent between the target identified by the `targetNodeId` and its opponent. |

**Returns**

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

A new instance of the [OpcBidirectionalReference](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcbidirectionalreference/) class initialized with the `targetNodeId` specified and setup using the `referenceTypeId` passed in a bidirectional manner.

**Exceptions**

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

### ToChild

<span class="api-meta">static · 6 overloads · since v2.7</span>

| Overload | Description |
|---|---|
| [ToChild(IOpcNode)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodereference/members#tochild-opc-uafx-iopcnode)<span class="api-meta">static · since v2.7</span> | Provides a unidirectional reference using the `targetNode` as the target of the reference. |
| [ToChild(IOpcNode, OpcReferenceType)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodereference/members#tochild-opc-uafx-iopcnode-opc-uafx-opcreferencetype)<span class="api-meta">static · since v2.7</span> | Provides a unidirectional reference using the `targetNode` as the target of the reference. |
| [ToChild(IOpcNode, OpcNodeId)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodereference/members#tochild-opc-uafx-iopcnode-opc-uafx-opcnodeid)<span class="api-meta">static · since v2.7</span> | Provides a unidirectional reference using the `targetNode` as the target of the reference. |
| [ToChild(OpcNodeId)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodereference/members#tochild-opc-uafx-opcnodeid)<span class="api-meta">static · since v2.7</span> | Provides a unidirectional reference using the `targetNodeId` as the identifier of the target of the reference. |
| [ToChild(OpcNodeId, OpcReferenceType)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodereference/members#tochild-opc-uafx-opcnodeid-opc-uafx-opcreferencetype)<span class="api-meta">static · since v2.7</span> | Provides a unidirectional reference using the `targetNodeId` as the identifier of the target of the reference. |
| [ToChild(OpcNodeId, OpcNodeId)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodereference/members#tochild-opc-uafx-opcnodeid-opc-uafx-opcnodeid)<span class="api-meta">static · since v2.7</span> | Provides a unidirectional reference using the `targetNodeId` as the identifier of target of the reference. |

#### ToChild(IOpcNode)

<span class="api-meta">static · since v2.7</span>

Provides a unidirectional reference using the `targetNode` as the target of the reference. The reference created represents a [ParentToChild](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcreferencedirection/#parenttochild) relation using [Organizes](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcreferencetype/#organizes) as the type of reference.

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

```csharp
public static OpcReference ToChild(IOpcNode targetNode)
```

</div>

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

```vbnet
Public Shared Function ToChild(targetNode As IOpcNode) As OpcReference
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `targetNode` | [IOpcNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.iopcnode/) | The [IOpcNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.iopcnode/) in which the reference constructed ceases. |

**Returns**

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

A new instance of the [OpcReference](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcreference/) class initialized with the `targetNode` specified and setup using the [Organizes](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcreferencetype/#organizes) in a unidirectional manner.

**Exceptions**

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

#### ToChild(IOpcNode, OpcReferenceType)

<span class="api-meta">static · since v2.7</span>

Provides a unidirectional reference using the `targetNode` as the target of the reference. The reference created represents a [ParentToChild](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcreferencedirection/#parenttochild) relation using the `referenceType` as the type of reference.

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

```csharp
public static OpcReference ToChild(
    IOpcNode targetNode,
    OpcReferenceType referenceType)
```

</div>

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

```vbnet
Public Shared Function ToChild(
    targetNode As IOpcNode,
    referenceType As OpcReferenceType) As OpcReference
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `targetNode` | [IOpcNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.iopcnode/) | The [IOpcNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.iopcnode/) in which the reference constructed ceases. |
| `referenceType` | [OpcReferenceType](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcreferencetype/) | One of the members defined by the [OpcReferenceType](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcreferencetype/) enumeration to use to setup the type of reference represented. |

**Returns**

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

A new instance of the [OpcReference](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcreference/) class initialized with the `targetNode` specified and setup using the `referenceType` passed in a unidirectional manner.

**Exceptions**

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

#### ToChild(IOpcNode, OpcNodeId)

<span class="api-meta">static · since v2.7</span>

Provides a unidirectional reference using the `targetNode` as the target of the reference. The reference created represents a [ParentToChild](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcreferencedirection/#parenttochild) relation using the type of reference identified by the `referenceTypeId` specified.

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

```csharp
public static OpcReference ToChild(
    IOpcNode targetNode,
    OpcNodeId referenceTypeId)
```

</div>

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

```vbnet
Public Shared Function ToChild(
    targetNode As IOpcNode,
    referenceTypeId As OpcNodeId) As OpcReference
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `targetNode` | [IOpcNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.iopcnode/) | The [IOpcNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.iopcnode/) in which the reference constructed ceases. |
| `referenceTypeId` | [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/) which identifies the type of reference to represent between the `targetNode` and its opponent. |

**Returns**

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

A new instance of the [OpcReference](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcreference/) class initialized with the `targetNode` specified and setup using the `referenceTypeId` passed in a unidirectional manner.

**Exceptions**

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

#### ToChild(OpcNodeId)

<span class="api-meta">static · since v2.7</span>

Provides a unidirectional reference using the `targetNodeId` as the identifier of the target of the reference. The reference created represents a [ParentToChild](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcreferencedirection/#parenttochild) relation using [Organizes](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcreferencetype/#organizes) as the type of reference.

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

```csharp
public static OpcReference ToChild(OpcNodeId targetNodeId)
```

</div>

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

```vbnet
Public Shared Function ToChild(targetNodeId As OpcNodeId) As OpcReference
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `targetNodeId` | [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/) which identifies the node in which the reference constructed ceases. |

**Returns**

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

A new instance of the [OpcReference](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcreference/) class initialized with the `targetNodeId` specified and setup using the [Organizes](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcreferencetype/#organizes) in a unidirectional manner.

**Exceptions**

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

#### ToChild(OpcNodeId, OpcReferenceType)

<span class="api-meta">static · since v2.7</span>

Provides a unidirectional reference using the `targetNodeId` as the identifier of the target of the reference. The reference created represents a [ParentToChild](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcreferencedirection/#parenttochild) relation using the `referenceType` as the type of reference.

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

```csharp
public static OpcReference ToChild(
    OpcNodeId targetNodeId,
    OpcReferenceType referenceType)
```

</div>

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

```vbnet
Public Shared Function ToChild(
    targetNodeId As OpcNodeId,
    referenceType As OpcReferenceType) As OpcReference
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `targetNodeId` | [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/) which identifies the node in which the reference constructed ceases. |
| `referenceType` | [OpcReferenceType](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcreferencetype/) | One of the members defined by the [OpcReferenceType](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcreferencetype/) enumeration to use to setup the type of reference represented. |

**Returns**

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

A new instance of the [OpcReference](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcreference/) class initialized with the `targetNodeId` specified and setup using the `referenceType` passed in a unidirectional manner.

**Exceptions**

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

#### ToChild(OpcNodeId, OpcNodeId)

<span class="api-meta">static · since v2.7</span>

Provides a unidirectional reference using the `targetNodeId` as the identifier of target of the reference. The reference created represents a [ParentToChild](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcreferencedirection/#parenttochild) relation using the type of reference identified by the `referenceTypeId` specified.

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

```csharp
public static OpcReference ToChild(
    OpcNodeId targetNodeId,
    OpcNodeId referenceTypeId)
```

</div>

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

```vbnet
Public Shared Function ToChild(
    targetNodeId As OpcNodeId,
    referenceTypeId As OpcNodeId) As OpcReference
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `targetNodeId` | [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/) which identifies the node in which the reference constructed ceases. |
| `referenceTypeId` | [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/) which identifies the type of reference to represent between the target identified by the `targetNodeId` and its opponent. |

**Returns**

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

A new instance of the [OpcReference](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcreference/) class initialized with the `targetNodeId` specified and setup using the `referenceTypeId` passed in a unidirectional manner.

**Exceptions**

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

### ToParent

<span class="api-meta">static · 6 overloads · since v2.7</span>

| Overload | Description |
|---|---|
| [ToParent(IOpcNode)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodereference/members#toparent-opc-uafx-iopcnode)<span class="api-meta">static · since v2.7</span> | Provides a unidirectional reference using the `targetNode` as the target of the reference. |
| [ToParent(IOpcNode, OpcReferenceType)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodereference/members#toparent-opc-uafx-iopcnode-opc-uafx-opcreferencetype)<span class="api-meta">static · since v2.7</span> | Provides a unidirectional reference using the `targetNode` as the target of the reference. |
| [ToParent(IOpcNode, OpcNodeId)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodereference/members#toparent-opc-uafx-iopcnode-opc-uafx-opcnodeid)<span class="api-meta">static · since v2.7</span> | Provides a unidirectional reference using the `targetNode` as the target of the reference. |
| [ToParent(OpcNodeId)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodereference/members#toparent-opc-uafx-opcnodeid)<span class="api-meta">static · since v2.7</span> | Provides a unidirectional reference using the `targetNodeId` as the identifier of the target of the reference. |
| [ToParent(OpcNodeId, OpcReferenceType)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodereference/members#toparent-opc-uafx-opcnodeid-opc-uafx-opcreferencetype)<span class="api-meta">static · since v2.7</span> | Provides a unidirectional reference using the `targetNodeId` as the identifier of the target of the reference. |
| [ToParent(OpcNodeId, OpcNodeId)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodereference/members#toparent-opc-uafx-opcnodeid-opc-uafx-opcnodeid)<span class="api-meta">static · since v2.7</span> | Provides a unidirectional reference using the `targetNodeId` as the identifier of target of the reference. |

#### ToParent(IOpcNode)

<span class="api-meta">static · since v2.7</span>

Provides a unidirectional reference using the `targetNode` as the target of the reference. The reference created represents a [ChildToParent](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcreferencedirection/#childtoparent) relation using [Organizes](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcreferencetype/#organizes) as the type of reference.

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

```csharp
public static OpcReference ToParent(IOpcNode targetNode)
```

</div>

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

```vbnet
Public Shared Function ToParent(targetNode As IOpcNode) As OpcReference
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `targetNode` | [IOpcNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.iopcnode/) | The [IOpcNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.iopcnode/) in which the reference constructed ceases. |

**Returns**

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

A new instance of the [OpcReference](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcreference/) class initialized with the `targetNode` specified and setup using the [Organizes](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcreferencetype/#organizes) in a unidirectional manner.

**Exceptions**

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

#### ToParent(IOpcNode, OpcReferenceType)

<span class="api-meta">static · since v2.7</span>

Provides a unidirectional reference using the `targetNode` as the target of the reference. The reference created represents a [ChildToParent](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcreferencedirection/#childtoparent) relation using the `referenceType` as the type of reference.

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

```csharp
public static OpcReference ToParent(
    IOpcNode targetNode,
    OpcReferenceType referenceType)
```

</div>

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

```vbnet
Public Shared Function ToParent(
    targetNode As IOpcNode,
    referenceType As OpcReferenceType) As OpcReference
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `targetNode` | [IOpcNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.iopcnode/) | The [IOpcNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.iopcnode/) in which the reference constructed ceases. |
| `referenceType` | [OpcReferenceType](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcreferencetype/) | One of the members defined by the [OpcReferenceType](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcreferencetype/) enumeration to use to setup the type of reference represented. |

**Returns**

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

A new instance of the [OpcReference](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcreference/) class initialized with the `targetNode` specified and setup using the `referenceType` passed in a unidirectional manner.

**Exceptions**

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

#### ToParent(IOpcNode, OpcNodeId)

<span class="api-meta">static · since v2.7</span>

Provides a unidirectional reference using the `targetNode` as the target of the reference. The reference created represents a [ChildToParent](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcreferencedirection/#childtoparent) relation using the type of reference identified by the `referenceTypeId` specified.

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

```csharp
public static OpcReference ToParent(
    IOpcNode targetNode,
    OpcNodeId referenceTypeId)
```

</div>

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

```vbnet
Public Shared Function ToParent(
    targetNode As IOpcNode,
    referenceTypeId As OpcNodeId) As OpcReference
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `targetNode` | [IOpcNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.iopcnode/) | The [IOpcNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.iopcnode/) in which the reference constructed ceases. |
| `referenceTypeId` | [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/) which identifies the type of reference to represent between the `targetNode` and its opponent. |

**Returns**

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

A new instance of the [OpcReference](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcreference/) class initialized with the `targetNode` specified and setup using the `referenceTypeId` passed in a unidirectional manner.

**Exceptions**

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

#### ToParent(OpcNodeId)

<span class="api-meta">static · since v2.7</span>

Provides a unidirectional reference using the `targetNodeId` as the identifier of the target of the reference. The reference created represents a [ChildToParent](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcreferencedirection/#childtoparent) relation using [Organizes](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcreferencetype/#organizes) as the type of reference.

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

```csharp
public static OpcReference ToParent(OpcNodeId targetNodeId)
```

</div>

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

```vbnet
Public Shared Function ToParent(targetNodeId As OpcNodeId) As OpcReference
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `targetNodeId` | [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/) which identifies the node in which the reference constructed ceases. |

**Returns**

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

A new instance of the [OpcReference](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcreference/) class initialized with the `targetNodeId` specified and setup using the [Organizes](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcreferencetype/#organizes) in a unidirectional manner.

**Exceptions**

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

#### ToParent(OpcNodeId, OpcReferenceType)

<span class="api-meta">static · since v2.7</span>

Provides a unidirectional reference using the `targetNodeId` as the identifier of the target of the reference. The reference created represents a [ChildToParent](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcreferencedirection/#childtoparent) relation using the `referenceType` as the type of reference.

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

```csharp
public static OpcReference ToParent(
    OpcNodeId targetNodeId,
    OpcReferenceType referenceType)
```

</div>

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

```vbnet
Public Shared Function ToParent(
    targetNodeId As OpcNodeId,
    referenceType As OpcReferenceType) As OpcReference
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `targetNodeId` | [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/) which identifies the node in which the reference constructed ceases. |
| `referenceType` | [OpcReferenceType](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcreferencetype/) | One of the members defined by the [OpcReferenceType](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcreferencetype/) enumeration to use to setup the type of reference represented. |

**Returns**

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

A new instance of the [OpcReference](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcreference/) class initialized with the `targetNodeId` specified and setup using the `referenceType` passed in a unidirectional manner.

**Exceptions**

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

#### ToParent(OpcNodeId, OpcNodeId)

<span class="api-meta">static · since v2.7</span>

Provides a unidirectional reference using the `targetNodeId` as the identifier of target of the reference. The reference created represents a [ChildToParent](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcreferencedirection/#childtoparent) relation using the type of reference identified by the `referenceTypeId` specified.

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

```csharp
public static OpcReference ToParent(
    OpcNodeId targetNodeId,
    OpcNodeId referenceTypeId)
```

</div>

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

```vbnet
Public Shared Function ToParent(
    targetNodeId As OpcNodeId,
    referenceTypeId As OpcNodeId) As OpcReference
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `targetNodeId` | [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/) which identifies the node in which the reference constructed ceases. |
| `referenceTypeId` | [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/) which identifies the type of reference to represent between the target identified by the `targetNodeId` and its opponent. |

**Returns**

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

A new instance of the [OpcReference](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcreference/) class initialized with the `targetNodeId` specified and setup using the `referenceTypeId` passed in a unidirectional manner.

**Exceptions**

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

### ToString

<span class="api-meta">override · since v2.7</span>

Returns a string representing the information contained in the [OpcNodeReference](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodereference/).

<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 which describes the information in this [OpcNodeReference](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodereference/).

**Overrides**

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