# OpcNamePath Class

> Reference: Defines a sequence of OpcName objects which can be used to browse through nodes using their Name values as the selection criteria to query node by node using the elements of the path.

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

Defines a sequence of [OpcName](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcname/) objects which can be used to browse through nodes using their [Name](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.iopcnodeinfo/members#name) values as the selection criteria to query node by node using the elements of the path.

## Syntax

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

```csharp
public class OpcNamePath
```

</div>

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

```vbnet
Public Class OpcNamePath
```

</div>

## Inheritance

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

## Implements

<ul class="api-implements">
<li><a href="https://learn.microsoft.com/dotnet/api/system.icomparable">IComparable</a></li>
<li><a href="https://learn.microsoft.com/dotnet/api/system.icomparable-1">IComparable</a>&lt;OpcNamePath&gt;</li>
<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.opcname/">OpcName</a>&gt;</li>
<li><a href="https://learn.microsoft.com/dotnet/api/system.iequatable-1">IEquatable</a>&lt;OpcNamePath&gt;</li>
</ul>

## Constructors

| Name | Description |
|---|---|
| [OpcNamePath](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnamepath/members#opcnamepath)<span class="api-meta">4 overloads</span> | Initializes a new instance of the OpcNamePath class using the `pathElements` specified. |

## Properties

| Name | Description |
|---|---|
| [Empty](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnamepath/members#empty)<span class="api-meta">static</span> | Gets the default empty path. |
| [IsEmpty](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnamepath/members#isempty) | Gets a value indicating whether the path is empty. |
| [Length](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnamepath/members#length) | Gets the number of elements contained in the OpcNamePath. |

## Methods

| Name | Description |
|---|---|
| [Combine](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnamepath/members#combine)<span class="api-meta">static</span> | Combines the `paths` specified into one path there its sequence of elements is created from the consecutive elements of the `paths` passed. |
| [CompareTo](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnamepath/members#compareto)<span class="api-meta">2 overloads</span> | Compares the current OpcNamePath with the `other`. |
| [Contains](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnamepath/members#contains) | Returns a value indicating whether a specified sub-path occurs within this OpcNamePath. |
| [Equals](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnamepath/members#equals)<span class="api-meta">2 overloads</span> | Determines whether the specified `other` is equal to this OpcNamePath. |
| [GetEnumerator](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnamepath/members#getenumerator)<span class="api-meta">since v2.19</span> | Returns an enumerator that iterates through the path elements. |
| [GetHashCode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnamepath/members#gethashcode)<span class="api-meta">override</span> | Retrieves a hash code for this OpcNamePath. |
| [Parse](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnamepath/members#parse)<span class="api-meta">static</span> | Converts a path string to a OpcNamePath instance. |
| [ToArray](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnamepath/members#toarray) | Copies the elements of the path to a new array of [OpcName](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcname/) instances. |
| [ToString](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnamepath/members#tostring)<span class="api-meta">override</span> | Returns a string representing the path. |
| [TryParse](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnamepath/members#tryparse)<span class="api-meta">static</span> | Determines whether a string is a valid path. |

## Operators

| Name | Description |
|---|---|
| [Equality](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnamepath/members#op-equality)<span class="api-meta">static</span> | Returns a value indicating whether two instance of OpcNamePath are equal. |
| [GreaterThan](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnamepath/members#op-greaterthan)<span class="api-meta">static</span> | Determines whether the first specified OpcNamePath object is greater than the second specified OpcNamePath object. |
| [GreaterThanOrEqual](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnamepath/members#op-greaterthanorequal)<span class="api-meta">static</span> | Determines whether the first specified OpcNamePath object is greater than or equal to the second specified OpcNamePath object. |
| [Implicit](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnamepath/members#op-implicit)<span class="api-meta">static · 2 overloads</span> | Converts a [string](https://learn.microsoft.com/dotnet/api/system.string) to an OpcNamePath object. |
| [Inequality](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnamepath/members#op-inequality)<span class="api-meta">static</span> | Returns a value indicating whether two instances of OpcNamePath are not equal. |
| [LessThan](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnamepath/members#op-lessthan)<span class="api-meta">static</span> | Determines whether the first specified OpcNamePath object is less than the second specified OpcNamePath object. |
| [LessThanOrEqual](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnamepath/members#op-lessthanorequal)<span class="api-meta">static</span> | Determines whether the first specified OpcNamePath object is less than or equal to the second OpcNamePath object. |

## Indexers

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

## Applies to

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