# OpcNamePath Members

> 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>Type</dt>
<dd><a href="./">OpcNamePath</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

### OpcNamePath

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

| Overload | Description |
|---|---|
| [OpcNamePath(params string\[\])](#opcnamepath-system-string-array) | Initializes a new instance of the [OpcNamePath](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnamepath/) class using the `pathElements` specified. |
| [OpcNamePath(params OpcName\[\])](#opcnamepath-opc-uafx-opcname-array) | Initializes a new instance of the [OpcNamePath](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnamepath/) class using the `pathElements` specified. |
| [OpcNamePath(IEnumerable&lt;string&gt;)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnamepath/members#opcnamepath-system-collections-generic-ienumerable-of-system-string) | Initializes a new instance of the [OpcNamePath](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnamepath/) class using the `pathElements` specified. |
| [OpcNamePath(IEnumerable&lt;OpcName&gt;)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnamepath/members#opcnamepath-system-collections-generic-ienumerable-of-opc-uafx-opcname) | Initializes a new instance of the [OpcNamePath](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnamepath/) class using the `pathElements` specified. |

**Exceptions (all overloads)**

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

#### OpcNamePath(params string\[\])

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

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

```csharp
public OpcNamePath(params string[] pathElements)
```

</div>

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

```vbnet
Public Sub New(ParamArray pathElements As String())
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `pathElements` | params [String](https://learn.microsoft.com/dotnet/api/system.string)[] | The elements of the new [OpcNamePath](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnamepath/) which are converted to [OpcName](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcname/) instances used by the new instance. |

**Exceptions**

| Exception | Condition |
|---|---|
| [ArgumentException](https://learn.microsoft.com/dotnet/api/system.argumentexception) | One of the items in `pathElements` is an empty string. |

#### OpcNamePath(params OpcName\[\])

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

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

```csharp
public OpcNamePath(params OpcName[] pathElements)
```

</div>

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

```vbnet
Public Sub New(ParamArray pathElements As OpcName())
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `pathElements` | params [OpcName](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcname/)[] | The elements of the new [OpcNamePath](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnamepath/). |

#### OpcNamePath(IEnumerable&lt;string&gt;)

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

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

```csharp
public OpcNamePath(IEnumerable<string> pathElements)
```

</div>

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

```vbnet
Public Sub New(pathElements As IEnumerable(Of String))
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `pathElements` | [IEnumerable](https://learn.microsoft.com/dotnet/api/system.collections.generic.ienumerable-1)&lt;[String](https://learn.microsoft.com/dotnet/api/system.string)&gt; | The elements of the new [OpcNamePath](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnamepath/) which are converted to [OpcName](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcname/) instances used by the new instance. |

**Exceptions**

| Exception | Condition |
|---|---|
| [ArgumentException](https://learn.microsoft.com/dotnet/api/system.argumentexception) | One of the items in `pathElements` is an empty string. |

#### OpcNamePath(IEnumerable&lt;OpcName&gt;)

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

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

```csharp
public OpcNamePath(IEnumerable<OpcName> pathElements)
```

</div>

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

```vbnet
Public Sub New(pathElements As IEnumerable(Of OpcName))
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `pathElements` | [IEnumerable](https://learn.microsoft.com/dotnet/api/system.collections.generic.ienumerable-1)&lt;[OpcName](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcname/)&gt; | The elements of the new [OpcNamePath](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnamepath/). |

## Properties

### Empty

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

Gets the default empty path.

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

```csharp
public static OpcNamePath Empty { get; }
```

</div>

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

```vbnet
Public Shared ReadOnly Property Empty As OpcNamePath
```

</div>

**Property value**

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

An instance of the [OpcNamePath](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnamepath/) which can be used for general purpose in cases there an empty path is enough.

### IsEmpty

Gets a value indicating whether the path is empty.

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

```csharp
public bool IsEmpty { get; }
```

</div>

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

```vbnet
Public ReadOnly Property IsEmpty As Boolean
```

</div>

**Property value**

[Boolean](https://learn.microsoft.com/dotnet/api/system.boolean)

The value true if there exist no element in the path; otherwise the value false.

### Length

Gets the number of elements contained in the [OpcNamePath](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnamepath/).

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

```csharp
public int Length { get; }
```

</div>

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

```vbnet
Public ReadOnly Property Length As Integer
```

</div>

**Property value**

[Int32](https://learn.microsoft.com/dotnet/api/system.int32)

The zero-based number of elements.

## Methods

### 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.

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

```csharp
public static OpcNamePath Combine(params OpcNamePath[] paths)
```

</div>

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

```vbnet
Public Shared Function Combine(ParamArray paths As OpcNamePath()) As OpcNamePath
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `paths` | params [OpcNamePath](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnamepath/)[] | The array of [OpcNamePath](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnamepath/) instances its elements have to be combined to a new [OpcNamePath](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnamepath/). |

**Returns**

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

A new instance of the [OpcNamePath](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnamepath/) class with the elements of the first path followed by the elements of the second path and so on for all other `paths` specified.

**Exceptions**

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

**Remarks**

In case there in `paths` is a null reference (Nothing in Visual Basic) it will be ignored.

### CompareTo

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

| Overload | Description |
|---|---|
| [CompareTo(object)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnamepath/members#compareto-system-object) | Compares the current [OpcNamePath](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnamepath/) with the `other`. |
| [CompareTo(OpcNamePath)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnamepath/members#compareto-opc-uafx-opcnamepath) | Compares the current [OpcNamePath](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnamepath/) with another [OpcNamePath](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnamepath/). |

#### CompareTo(object)

Compares the current [OpcNamePath](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnamepath/) with the `other`.

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

```csharp
public int CompareTo(object other)
```

</div>

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

```vbnet
Public Function CompareTo(other As Object) As Integer
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `other` | [Object](https://learn.microsoft.com/dotnet/api/system.object) | The [OpcNamePath](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnamepath/) to compare with this [OpcNamePath](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnamepath/). |

**Returns**

[Int32](https://learn.microsoft.com/dotnet/api/system.int32)

A 32-bit signed integer that indicates the relative order of the objects being compared ([CompareTo(object)](https://learn.microsoft.com/dotnet/api/system.icomparable.compareto)).

**Implements**

[CompareTo(object)](https://learn.microsoft.com/dotnet/api/system.icomparable.compareto)

#### CompareTo(OpcNamePath)

Compares the current [OpcNamePath](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnamepath/) with another [OpcNamePath](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnamepath/).

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

```csharp
public int CompareTo(OpcNamePath other)
```

</div>

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

```vbnet
Public Function CompareTo(other As OpcNamePath) As Integer
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `other` | [OpcNamePath](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnamepath/) | The [OpcNamePath](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnamepath/) to compare with this [OpcNamePath](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnamepath/). |

**Returns**

[Int32](https://learn.microsoft.com/dotnet/api/system.int32)

A 32-bit signed integer that indicates the relative order of the objects being compared ([CompareTo(T)](https://learn.microsoft.com/dotnet/api/system.icomparable-1.compareto)).

**Implements**

[CompareTo(OpcNamePath)](https://learn.microsoft.com/dotnet/api/system.icomparable-1.compareto)

### Contains

Returns a value indicating whether a specified sub-path occurs within this [OpcNamePath](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnamepath/).

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

```csharp
public bool Contains(OpcNamePath path)
```

</div>

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

```vbnet
Public Function Contains(path As OpcNamePath) As Boolean
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `path` | [OpcNamePath](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnamepath/) | The [OpcNamePath](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnamepath/) to seek. |

**Returns**

[Boolean](https://learn.microsoft.com/dotnet/api/system.boolean)

The value true if `path` is a sub-path of this [OpcNamePath](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnamepath/); otherwise the value false.

**Exceptions**

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

### Equals

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

| Overload | Description |
|---|---|
| [Equals(object)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnamepath/members#equals-system-object)<span class="api-meta">override</span> | Determines whether the specified `other` is equal to this [OpcNamePath](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnamepath/). |
| [Equals(OpcNamePath)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnamepath/members#equals-opc-uafx-opcnamepath) | Determines whether the specified `other` is equal to this [OpcNamePath](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnamepath/). |

#### Equals(object)

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

Determines whether the specified `other` is equal to this [OpcNamePath](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnamepath/).

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

```csharp
public override bool Equals(object other)
```

</div>

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

```vbnet
Public Overrides Function Equals(other As Object) As Boolean
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `other` | [Object](https://learn.microsoft.com/dotnet/api/system.object) | The [OpcNamePath](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnamepath/) to compare to the current [OpcNamePath](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnamepath/). |

**Returns**

[Boolean](https://learn.microsoft.com/dotnet/api/system.boolean)

The value true if the specified [OpcNamePath](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnamepath/) is equal to the current [OpcNamePath](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnamepath/); otherwise the value false.

**Overrides**

[Equals(object)](https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals%28system-object%29)

#### Equals(OpcNamePath)

Determines whether the specified `other` is equal to this [OpcNamePath](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnamepath/).

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

```csharp
public bool Equals(OpcNamePath other)
```

</div>

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

```vbnet
Public Function Equals(other As OpcNamePath) As Boolean
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `other` | [OpcNamePath](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnamepath/) | The [OpcNamePath](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnamepath/) to compare to the current [OpcNamePath](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnamepath/). |

**Returns**

[Boolean](https://learn.microsoft.com/dotnet/api/system.boolean)

The value true if the specified [OpcNamePath](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnamepath/) is equal to the current [OpcNamePath](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnamepath/); otherwise the value false.

**Implements**

[Equals(OpcNamePath)](https://learn.microsoft.com/dotnet/api/system.iequatable-1.equals)

### GetEnumerator

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

Returns an enumerator that iterates through the path elements.

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

```csharp
public IEnumerator<OpcName> GetEnumerator()
```

</div>

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

```vbnet
Public Function GetEnumerator() As IEnumerator(Of OpcName)
```

</div>

**Returns**

[IEnumerator](https://learn.microsoft.com/dotnet/api/system.collections.generic.ienumerator-1)&lt;[OpcName](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcname/)&gt;

An enumerator that can be used to iterate through the path elements.

**Implements**

[GetEnumerator()](https://learn.microsoft.com/dotnet/api/system.collections.generic.ienumerable-1.getenumerator)

### GetHashCode

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

Retrieves a hash code for this [OpcNamePath](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnamepath/).

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

```csharp
public override int GetHashCode()
```

</div>

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

```vbnet
Public Overrides Function GetHashCode() As Integer
```

</div>

**Returns**

[Int32](https://learn.microsoft.com/dotnet/api/system.int32)

An [int](https://learn.microsoft.com/dotnet/api/system.int32) that contains the hash code for the [OpcNamePath](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnamepath/).

**Overrides**

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

### Parse

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

Converts a path string to a [OpcNamePath](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnamepath/) instance.

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

```csharp
public static OpcNamePath Parse(string value)
```

</div>

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

```vbnet
Public Shared Function Parse(value As String) As OpcNamePath
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `value` | [String](https://learn.microsoft.com/dotnet/api/system.string) | A string that contains a path. |

**Returns**

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

An instance of the [OpcNamePath](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnamepath/) class.

**Exceptions**

| Exception | Condition |
|---|---|
| [FormatException](https://learn.microsoft.com/dotnet/api/system.formatexception) | The `value` is not a valid path. |

### 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.

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

```csharp
public OpcName[] ToArray()
```

</div>

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

```vbnet
Public Function ToArray() As OpcName()
```

</div>

**Returns**

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

An array of [OpcName](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcname/) instances representing the elements of the path.

### ToString

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

Returns a string representing the path.

<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 formatted with the elements of the path.

**Overrides**

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

### TryParse

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

Determines whether a string is a valid path.

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

```csharp
public static bool TryParse(string value, out OpcNamePath path)
```

</div>

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

```vbnet
Public Shared Function TryParse(value As String, path As OpcNamePath) As Boolean
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `value` | [String](https://learn.microsoft.com/dotnet/api/system.string) | The string to validate. |
| `path` | out [OpcNamePath](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnamepath/) | The [OpcNamePath](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnamepath/) version of the string. |

**Returns**

[Boolean](https://learn.microsoft.com/dotnet/api/system.boolean)

The value true, if `value` is a valid path; otherwise the value false.

## Operators

### Equality

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

Returns a value indicating whether two instance of [OpcNamePath](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnamepath/) are equal.

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

```csharp
public static bool operator ==(OpcNamePath left, OpcNamePath right)
```

</div>

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

```vbnet
Public Shared Operator =(left As OpcNamePath, right As OpcNamePath) As Boolean
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `left` | [OpcNamePath](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnamepath/) | The first [OpcNamePath](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnamepath/) to compare. |
| `right` | [OpcNamePath](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnamepath/) | The second [OpcNamePath](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnamepath/) to compare. |

**Returns**

[Boolean](https://learn.microsoft.com/dotnet/api/system.boolean)

The value true if left and right are equal; otherwise the value false.

### GreaterThan

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

Determines whether the first specified [OpcNamePath](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnamepath/) object is greater than the second specified [OpcNamePath](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnamepath/) object.

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

```csharp
public static bool operator >(OpcNamePath left, OpcNamePath right)
```

</div>

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

```vbnet
Public Shared Operator >(left As OpcNamePath, right As OpcNamePath) As Boolean
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `left` | [OpcNamePath](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnamepath/) | The first [OpcNamePath](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnamepath/) object. |
| `right` | [OpcNamePath](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnamepath/) | The second [OpcNamePath](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnamepath/) object. |

**Returns**

[Boolean](https://learn.microsoft.com/dotnet/api/system.boolean)

The value true if `left` is greater than `right`; otherwise, false.

### GreaterThanOrEqual

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

Determines whether the first specified [OpcNamePath](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnamepath/) object is greater than or equal to the second specified [OpcNamePath](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnamepath/) object.

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

```csharp
public static bool operator >=(OpcNamePath left, OpcNamePath right)
```

</div>

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

```vbnet
Public Shared Operator >=(left As OpcNamePath, right As OpcNamePath) As Boolean
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `left` | [OpcNamePath](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnamepath/) | The first [OpcNamePath](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnamepath/) object. |
| `right` | [OpcNamePath](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnamepath/) | The second [OpcNamePath](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnamepath/) object. |

**Returns**

[Boolean](https://learn.microsoft.com/dotnet/api/system.boolean)

The value true if `left` is greater than or equal to `right`; otherwise, false.

### Implicit

<span class="api-meta">static · 2 overloads</span>

| Overload | Description |
|---|---|
| [implicit operator OpcNamePath(string)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnamepath/members#op-implicit-system-string-opc-uafx-opcnamepath)<span class="api-meta">static</span> | Converts a [string](https://learn.microsoft.com/dotnet/api/system.string) to an [OpcNamePath](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnamepath/) object. |
| [implicit operator OpcNamePath(OpcName)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnamepath/members#op-implicit-opc-uafx-opcname-opc-uafx-opcnamepath)<span class="api-meta">static</span> | Creates a new instance of the [OpcNamePath](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnamepath/) from the `value` specified. |

#### implicit operator OpcNamePath(string)

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

Converts a [string](https://learn.microsoft.com/dotnet/api/system.string) to an [OpcNamePath](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnamepath/) object.

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

```csharp
public static implicit operator OpcNamePath(string value)
```

</div>

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

```vbnet
Public Shared Widening Operator CType(value As String) As OpcNamePath
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `value` | [String](https://learn.microsoft.com/dotnet/api/system.string) | A string that represents the name path. |

**Returns**

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

An instance of the [OpcNamePath](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnamepath/) class initialized from the `value` or a null reference (Nothing in Visual Basic) if `value` is a null reference (Nothing in Visual Basic).

#### implicit operator OpcNamePath(OpcName)

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

Creates a new instance of the [OpcNamePath](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnamepath/) from the `value` specified.

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

```csharp
public static implicit operator OpcNamePath(OpcName value)
```

</div>

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

```vbnet
Public Shared Widening Operator CType(value As OpcName) As OpcNamePath
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `value` | [OpcName](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcname/) | The [OpcName](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcname/) representing the only element in the path. |

**Returns**

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

An instance of the [OpcNamePath](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnamepath/) class initialized with the `value` specified or a null reference (Nothing in Visual Basci) if `value` is a null reference (Nothing in Visual Basic).

### Inequality

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

Returns a value indicating whether two instances of [OpcNamePath](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnamepath/) are not equal.

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

```csharp
public static bool operator !=(OpcNamePath left, OpcNamePath right)
```

</div>

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

```vbnet
Public Shared Operator <>(left As OpcNamePath, right As OpcNamePath) As Boolean
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `left` | [OpcNamePath](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnamepath/) | The first [OpcNamePath](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnamepath/) to compare. |
| `right` | [OpcNamePath](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnamepath/) | The second [OpcNamePath](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnamepath/) to compare. |

**Returns**

[Boolean](https://learn.microsoft.com/dotnet/api/system.boolean)

The value true if left and right are not equal; otherwise the value false.

### LessThan

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

Determines whether the first specified [OpcNamePath](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnamepath/) object is less than the second specified [OpcNamePath](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnamepath/) object.

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

```csharp
public static bool operator <(OpcNamePath left, OpcNamePath right)
```

</div>

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

```vbnet
Public Shared Operator <(left As OpcNamePath, right As OpcNamePath) As Boolean
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `left` | [OpcNamePath](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnamepath/) | The first [OpcNamePath](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnamepath/) object. |
| `right` | [OpcNamePath](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnamepath/) | The second [OpcNamePath](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnamepath/) object. |

**Returns**

[Boolean](https://learn.microsoft.com/dotnet/api/system.boolean)

The value true if `left` is less than `right`; otherwise the value false.

**Exceptions**

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

### LessThanOrEqual

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

Determines whether the first specified [OpcNamePath](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnamepath/) object is less than or equal to the second [OpcNamePath](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnamepath/) object.

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

```csharp
public static bool operator <=(OpcNamePath left, OpcNamePath right)
```

</div>

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

```vbnet
Public Shared Operator <=(left As OpcNamePath, right As OpcNamePath) As Boolean
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `left` | [OpcNamePath](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnamepath/) | The first [OpcNamePath](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnamepath/) object. |
| `right` | [OpcNamePath](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnamepath/) | The second [OpcNamePath](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnamepath/) object. |

**Returns**

[Boolean](https://learn.microsoft.com/dotnet/api/system.boolean)

The value true if `left` is less than or equal to `right`; otherwise the value false.

**Exceptions**

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

## Indexers

### Item

Gets the [OpcName](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcname/) at the specified index.

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

```csharp
public OpcName this[int index] { get; }
```

</div>

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

```vbnet
Public ReadOnly Default Property this[](index As Integer) As OpcName
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `index` | [Int32](https://learn.microsoft.com/dotnet/api/system.int32) | The zero-based index of the element to get. |

**Property value**

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

The [OpcName](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcname/) at the specified index.

**Exceptions**

| Exception | Condition |
|---|---|
| [ArgumentOutOfRangeException](https://learn.microsoft.com/dotnet/api/system.argumentoutofrangeexception) | The `index` is not valid index in the [OpcNamePath](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnamepath/). |
