# OpcRelativePath 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">OpcRelativePath Members</a></dd>
<dt>Also in</dt>
<dd>Opc.UaFx.Client</dd>
</dl>

Defines a sequence of references and browse names to follow.

## Syntax

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

```csharp
public class OpcRelativePath
```

</div>

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

```vbnet
Public Class OpcRelativePath
```

</div>

## Inheritance

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

## Implements

<ul class="api-implements">
<li><a href="https://learn.microsoft.com/dotnet/api/system.collections.ienumerable">IEnumerable</a></li>
<li><a href="https://learn.microsoft.com/dotnet/api/system.collections.generic.ienumerable-1">IEnumerable</a>&lt;<a href="../opc.uafx.opcrelativepathelement/">OpcRelativePathElement</a>&gt;</li>
</ul>

## Constructors

| Name | Description |
|---|---|
| [OpcRelativePath](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcrelativepath/members#opcrelativepath)<span class="api-meta">6 overloads</span> | Initializes a new instance of the OpcRelativePath class with the `pathElements` specified to define a path following hierarchical references using the `pathElements` as the browse names of the nodes their path is to be expressed. |

## Properties

| Name | Description |
|---|---|
| [Length](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcrelativepath/members#length) | Gets the total number of elements in the OpcRelativePath. |

## Methods

| Name | Description |
|---|---|
| [Combine](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcrelativepath/members#combine)<span class="api-meta">static</span> | Combines the `paths` into a single OpcRelativePath. |
| [GetEnumerator](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcrelativepath/members#getenumerator)<span class="api-meta">since v2.18</span> | Returns an enumerator that iterates through the path. |
| [Parse](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcrelativepath/members#parse)<span class="api-meta">static · 2 overloads</span> | Converts a path string to a OpcRelativePath instance. |
| [ToString](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcrelativepath/members#tostring)<span class="api-meta">2 overloads</span> | Returns a string representing the relative path. |
| [TryParse](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcrelativepath/members#tryparse)<span class="api-meta">static · 2 overloads · since v2.18</span> | Determines whether a string is a valid path. |

## Indexers

| Name | Description |
|---|---|
| [Item](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcrelativepath/members#item) | Gets the [OpcRelativePathElement](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcrelativepathelement/) at the specified index. |

## Applies to

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