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

Defines an identifier for a node in the address space of an OPC UA Server.

## Syntax

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

```csharp
public class OpcNodeId
```

</div>

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

```vbnet
<OpcDataType(17)>
Public Class OpcNodeId
```

</div>

## Inheritance

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

## 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;OpcNodeId&gt;</li>
<li><a href="https://learn.microsoft.com/dotnet/api/system.iequatable-1">IEquatable</a>&lt;OpcNodeId&gt;</li>
</ul>

## Constructors

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

## Fields

| Name | Description |
|---|---|
| [DefaultSeparator](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeid/members#defaultseparator)<span class="api-meta">static</span> | Defines the character which is used to separate parent-child related node identifiers from each other when constructing a parent-child related node identifier using [Of](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeid/members#of-opc-uafx-opcname-opc-uafx-opcnodeid). |
| [DefaultSeparatorOfPath](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeid/members#defaultseparatorofpath)<span class="api-meta">static</span> | Defines the character which is used to separate node-component-node related node identifiers form each other when constructing a node-component-node related node identifier using [WithPath](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeid/members#withpath-opc-uafx-opcnamepath). |

## Properties

| Name | Description |
|---|---|
| [Factory](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeid/members#factory)<span class="api-meta">static</span> | Gets or sets the globally used [OpcNodeIdFactory](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeidfactory/) to generate new instances of the OpcNodeId class. |
| [IsAbsolute](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeid/members#isabsolute) | Gets a value indicating whether the identifier is an absolute one. |
| [IsNull](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeid/members#isnull) | Gets a value indicating whether the node identifier is a null identifier. |
| [Namespace](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeid/members#namespace) | Gets the [OpcNamespace](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnamespace/) used by the OpcNodeId to describe the namespace to that the node identifier belongs. |
| [NamespaceIndex](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeid/members#namespaceindex) | Gets the index of the namespace that this identifier belongs. |
| [NamespaceUri](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeid/members#namespaceuri) | Gets the uniform resource identifier (URI) of the namespace referred by the [NamespaceIndex](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeid/members#namespaceindex). |
| [Null](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeid/members#null)<span class="api-meta">static</span> | Gets the default null node identifier. |
| [OriginalFormat](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeid/members#originalformat) | Gets the original format of the node identifier from that the instance was constructed. |
| [OriginalString](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeid/members#originalstring) | Gets the original node identifier string that was passed to the [Parse](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeid/members#parse) method. |
| [Path](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeid/members#path) | Gets the path portion of the [Value](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeid/members#value) which refers to the logical (= physically not available in the address space) portion of the identifier. |
| [Resolution](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeid/members#resolution)<span class="api-meta">static · since v2.26</span> | Gets an instance of the [OpcNodeIdResolution](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeidresolution/) class used to resolve node identifiers. |
| [Type](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeid/members#type) | Gets the type of [Value](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeid/members#value) used to define the identifier. |
| [Value](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeid/members#value) | Gets the [Type](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeid/members#type) dependent value of the identifier represented. |
| [ValueAsString](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeid/members#valueasstring) | Gets the [Value](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeid/members#value) formatted as a [string](https://learn.microsoft.com/dotnet/api/system.string). |

## Methods

| Name | Description |
|---|---|
| [Compare](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeid/members#compare)<span class="api-meta">static · since v2.41</span> | Compares two specified OpcNodeId objects according to a specific comparison method. |
| [CompareTo](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeid/members#compareto)<span class="api-meta">3 overloads</span> | Compares the current OpcNodeId with the `other`. |
| [Equals](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeid/members#equals)<span class="api-meta">5 overloads</span> | Determines whether the specified `other` is equal to this OpcNodeId. |
| [ExcludePath](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeid/members#excludepath) | Retrieves a new OpcNodeId there its [Value](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeid/members#value) not longer contains any [Path](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeid/members#path) information. |
| [GetHashCode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeid/members#gethashcode)<span class="api-meta">override</span> | Retrieves a hash code for this OpcNodeId. |
| [IsNullOrEmpty](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeid/members#isnullorempty)<span class="api-meta">static · since v2.14</span> | Indicates whether the specified OpcNodeId is null or its [Value](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeid/members#value) is null, default or an empty string (""). |
| [Of](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeid/members#of)<span class="api-meta">static · 3 overloads</span> | Creates a new OpcNodeId instance from the `name` specified. |
| [Parse](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeid/members#parse)<span class="api-meta">static</span> | Converts a node identifier string to a OpcNodeId instance. |
| [Resolve](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeid/members#resolve) | Resolves this node identifier to a new node identifier its [Namespace](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeid/members#namespace) might be known in the context of the `resolver` object specified. |
| [ToString](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeid/members#tostring)<span class="api-meta">2 overloads</span> | Returns a string representing the node identifier. |
| [TryParse](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeid/members#tryparse)<span class="api-meta">static</span> | Determines whether a string is a valid node identifier. |
| [UriIdentifier](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeid/members#uriidentifier)<span class="api-meta">static</span> | Retrieves the [Value](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeid/members#value) of the `nodeId` as an [Uri](https://learn.microsoft.com/dotnet/api/system.uri). |
| [WithPath](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeid/members#withpath)<span class="api-meta">2 overloads</span> | Defines a new OpcNodeId using the [Value](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeid/members#value), [Namespace](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeid/members#namespace) and [Path](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeid/members#path) of this OpcNodeId by combining this [Path](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeid/members#path) with the `path` specified. |

## Operators

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

## Applies to

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