# OpcReference Class

<dl class="api-definition">
<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>Members</dt>
<dd><a href="./members">OpcReference Members</a></dd>
<dt>Also in</dt>
<dd>Opc.UaFx.Client</dd>
</dl>

Describes a unidirectional reference from a logical 'parent' to a logical 'child' or vice versa using a specific type of reference between the two opponents.

## Syntax

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

```csharp
public class OpcReference
```

</div>

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

```vbnet
Public Class OpcReference
```

</div>

## Inheritance

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

## Implements

<ul class="api-implements">
<li><a href="../opc.uafx.iopcnodereferenceaware/">IOpcNodeReferenceAware</a></li>
</ul>

## Constructors

| Name | Description |
|---|---|
| [OpcReference](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcreference/members#opcreference)<span class="api-meta">4 overloads · since v2.7</span> | Initializes a new instance of the [OpcBidirectionalReference](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcbidirectionalreference/) class using the `targetNode` as the target of the reference and using the value of the `type` parameter as the type of reference in the relation defined by `direction`. |

## Properties

| Name | Description |
|---|---|
| [Direction](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcreference/members#direction) | Gets a value indicating the logical direction of the reference represented. |
| [TargetNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcreference/members#targetnode)<span class="api-meta">since v2.7</span> | Gets the node to which the reference refers to. |
| [TargetNodeId](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcreference/members#targetnodeid)<span class="api-meta">since v2.7</span> | Gets the identifier of the node to which the reference refers to. |
| [Type](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcreference/members#type)<span class="api-meta">since v2.7</span> | Gets a value which defines the pre-defined type of reference represented. |
| [TypeId](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcreference/members#typeid)<span class="api-meta">since v2.7</span> | Gets the identifier which identifies the node that defines the semantic of the reference between the source and the target node represented through this OpcReference and generally reflects an operation between the two, such as "A contains B". |

## Methods

| Name | Description |
|---|---|
| [GetReferences](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcreference/members#getreferences)<span class="api-meta">3 overloads · since v2.7</span> | Retrieves an empty sequence of [OpcNodeReference](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodereference/) instances. |
| [ToString](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcreference/members#tostring)<span class="api-meta">override · since v2.7</span> | Returns a string representing the information contained in the OpcReference. |

## Applies to

| Package | Versions |
|---|---|
| Opc.UaFx.Advanced | v2.5–v2.59 |
