# OpcNodeSet Members

> Reference: Provides a static in-memory representation of an address space including its nodes their references to each other and the used types.

<dl class="api-definition">
<dt>Type</dt>
<dd><a href="./">OpcNodeSet</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>

## Properties

### Context

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

Gets the [OpcContext](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opccontext/) used for this [OpcNodeSet](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeset/).

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

```csharp
public OpcContext Context { get; }
```

</div>

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

```vbnet
Public ReadOnly Property Context As OpcContext
```

</div>

**Property value**

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

A [OpcContext](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opccontext/) used to create this [OpcNodeSet](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeset/) or a null reference (Nothing in Visual Basic) if this [OpcNodeSet](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeset/) has been created without any specific [OpcContext](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opccontext/).

### LastModified

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

Gets the last time the node set document was modified.

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

```csharp
public DateTime? LastModified { get; }
```

</div>

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

```vbnet
Public ReadOnly Property LastModified As Date?
```

</div>

**Property value**

[Nullable](https://learn.microsoft.com/dotnet/api/system.nullable-1)&lt;[DateTime](https://learn.microsoft.com/dotnet/api/system.datetime)&gt;

The last time the node set document was modified or a null reference (Nothing in Visual Basic) if there is no time of the last modification available.

**Remarks**

The value of this property is primarly determined by the contents of the node set document the current [OpcNodeSet](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeset/) originates from. In case there the node set document does not provide the last modified information this property represents the [LastWriteTime](https://learn.microsoft.com/dotnet/api/system.io.filesysteminfo.lastwritetime) in case there the node set has been created from a file; otherwise a null reference (Nothing in Visual Basic).

### Models

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

Gets a read-only collection of the models declared by the node set.

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

```csharp
public OpcReadOnlyModelCollection Models { get; }
```

</div>

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

```vbnet
Public ReadOnly Property Models As OpcReadOnlyModelCollection
```

</div>

**Property value**

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

An instance of the [OpcReadOnlyModelCollection](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcreadonlymodelcollection/) class with an [OpcModel](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcmodel/) for each model declared by the current [OpcNodeSet](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeset/); empty if it declares no model.

### Name

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

Gets the name of the node set.

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

```csharp
public string Name { get; }
```

</div>

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

```vbnet
Public ReadOnly Property Name As String
```

</div>

**Property value**

[String](https://learn.microsoft.com/dotnet/api/system.string)

The [Name](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcmodel/members#name) of the first model declared by the current [OpcNodeSet](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeset/) (see [Models](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeset/members#models)). In case there it declares no model with a name and the [OpcNodeSet](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeset/) has been created from a file, the name of the file without extension; otherwise a null reference (Nothing in Visual Basic).

### Namespaces

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

Gets a read-only collection of [OpcNamespace](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnamespace/)s referred to.

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

```csharp
public OpcReadOnlyNamespaceCollection Namespaces { get; }
```

</div>

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

```vbnet
Public ReadOnly Property Namespaces As OpcReadOnlyNamespaceCollection
```

</div>

**Property value**

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

An instance of the [OpcReadOnlyNamespaceCollection](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcreadonlynamespacecollection/) class with the [OpcNamespace](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnamespace/) information used by the current [OpcNodeSet](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeset/).

## Methods

### GetDataType

<span class="api-meta">6 overloads · since v2.9</span>

| Overload | Description |
|---|---|
| [GetDataType(string)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeset/members#getdatatype-system-string)<span class="api-meta">since v2.9</span> | Retrieves the [OpcDataTypeInfo](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcdatatypeinfo/) object which is known under the `name` specified. |
| [GetDataType(OpcName)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeset/members#getdatatype-opc-uafx-opcname)<span class="api-meta">since v2.9</span> | Retrieves the [OpcDataTypeInfo](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcdatatypeinfo/) object which is known under the `name` specified. |
| [GetDataType(OpcNodeId)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeset/members#getdatatype-opc-uafx-opcnodeid)<span class="api-meta">since v2.9</span> | Retrieves the [OpcDataTypeInfo](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcdatatypeinfo/) object which declares the type which is identified by the `typeId` specified. |
| [GetDataType(Type)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeset/members#getdatatype-system-type)<span class="api-meta">since v2.9</span> | Retrieves the [OpcDataTypeInfo](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcdatatypeinfo/) object which declares the type implemented by the `underlyingType` specified. |
| [GetDataType(OpcEncoding)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeset/members#getdatatype-opc-uafx-opcencoding)<span class="api-meta">since v2.9</span> | Retrieves the [OpcDataTypeInfo](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcdatatypeinfo/) object which declares the type which is identified by the `encoding` specified. |
| [GetDataType(XmlQualifiedName)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeset/members#getdatatype-system-xml-xmlqualifiedname)<span class="api-meta">since v2.9</span> | Retrieves the [OpcDataTypeInfo](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcdatatypeinfo/) object which is known under the `xmlName` specified. |

#### GetDataType(string)

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

Retrieves the [OpcDataTypeInfo](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcdatatypeinfo/) object which is known under the `name` specified.

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

```csharp
public OpcDataTypeInfo GetDataType(string name)
```

</div>

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

```vbnet
Public Function GetDataType(name As String) As OpcDataTypeInfo
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `name` | [String](https://learn.microsoft.com/dotnet/api/system.string) | The [string](https://learn.microsoft.com/dotnet/api/system.string) to use to identify the [OpcDataTypeInfo](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcdatatypeinfo/) object to retrieve. |

**Returns**

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

The [OpcDataTypeInfo](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcdatatypeinfo/) object its [Name](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcdatatypeinfo/members#name) is equals (regarding its [Value](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcname/members#value)) to the `name` specified; otherwise a null reference (Nothing in Visual Basic).

**Exceptions**

| Exception | Condition |
|---|---|
| [ArgumentException](https://learn.microsoft.com/dotnet/api/system.argumentexception) | The `name` is equals [Empty](https://learn.microsoft.com/dotnet/api/system.string.empty). |
| [ArgumentNullException](https://learn.microsoft.com/dotnet/api/system.argumentnullexception) | The `name` is a null reference (Nothing in Visual Basic). |

#### GetDataType(OpcName)

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

Retrieves the [OpcDataTypeInfo](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcdatatypeinfo/) object which is known under the `name` specified.

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

```csharp
public OpcDataTypeInfo GetDataType(OpcName name)
```

</div>

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

```vbnet
Public Function GetDataType(name As OpcName) As OpcDataTypeInfo
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `name` | [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/) of the [OpcDataTypeInfo](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcdatatypeinfo/) object to retrieve. |

**Returns**

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

The [OpcDataTypeInfo](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcdatatypeinfo/) object its [Name](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcdatatypeinfo/members#name) is equals to the `name` specified; otherwise a null reference (Nothing in Visual Basic).

**Exceptions**

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

#### GetDataType(OpcNodeId)

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

Retrieves the [OpcDataTypeInfo](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcdatatypeinfo/) object which declares the type which is identified by the `typeId` specified.

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

```csharp
public OpcDataTypeInfo GetDataType(OpcNodeId typeId)
```

</div>

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

```vbnet
Public Function GetDataType(typeId As OpcNodeId) As OpcDataTypeInfo
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `typeId` | [OpcNodeId](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeid/) | The [OpcNodeId](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeid/) which identifies the [OpcDataTypeInfo](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcdatatypeinfo/) to retrieve. |

**Returns**

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

The [OpcDataTypeInfo](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcdatatypeinfo/) object which is known under the `typeId` specified or a null reference (Nothing in Visual Basic) if there doesn't exist a known [OpcDataTypeInfo](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcdatatypeinfo/) object which is associated with the `typeId` specified.

**Exceptions**

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

#### GetDataType(Type)

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

Retrieves the [OpcDataTypeInfo](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcdatatypeinfo/) object which declares the type implemented by the `underlyingType` specified.

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

```csharp
public OpcDataTypeInfo GetDataType(Type underlyingType)
```

</div>

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

```vbnet
Public Function GetDataType(underlyingType As Type) As OpcDataTypeInfo
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `underlyingType` | [Type](https://learn.microsoft.com/dotnet/api/system.type) | The [Type](https://learn.microsoft.com/dotnet/api/system.type) which implements the [OpcDataTypeInfo](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcdatatypeinfo/) to retrieve. |

**Returns**

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

The [OpcDataTypeInfo](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcdatatypeinfo/) object which declares the `underlyingType` specified or a null reference (Nothing in Visual Basic) if there isn't a [OpcDataTypeInfo](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcdatatypeinfo/) object associated with the `underlyingType` specified.

**Exceptions**

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

#### GetDataType(OpcEncoding)

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

Retrieves the [OpcDataTypeInfo](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcdatatypeinfo/) object which declares the type which is identified by the `encoding` specified.

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

```csharp
public OpcDataTypeInfo GetDataType(OpcEncoding encoding)
```

</div>

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

```vbnet
Public Function GetDataType(encoding As OpcEncoding) As OpcDataTypeInfo
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `encoding` | [OpcEncoding](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcencoding/) | The [OpcEncoding](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcencoding/) which identifies the [OpcDataTypeInfo](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcdatatypeinfo/) to retrieve. |

**Returns**

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

The [OpcDataTypeInfo](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcdatatypeinfo/) object which is known under the `encoding` specified or a null reference (Nothing in Visual Basic) if there doesn't exist a known [OpcDataTypeInfo](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcdatatypeinfo/) which is associated with the `encoding` specified.

**Exceptions**

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

#### GetDataType(XmlQualifiedName)

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

Retrieves the [OpcDataTypeInfo](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcdatatypeinfo/) object which is known under the `xmlName` specified.

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

```csharp
public OpcDataTypeInfo GetDataType(XmlQualifiedName xmlName)
```

</div>

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

```vbnet
Public Function GetDataType(xmlName As XmlQualifiedName) As OpcDataTypeInfo
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `xmlName` | [XmlQualifiedName](https://learn.microsoft.com/dotnet/api/system.xml.xmlqualifiedname) | The [XmlQualifiedName](https://learn.microsoft.com/dotnet/api/system.xml.xmlqualifiedname) of the [OpcDataTypeInfo](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcdatatypeinfo/) object to retrieve. |

**Returns**

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

The [OpcDataTypeInfo](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcdatatypeinfo/) object its [XmlName](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcdatatypeinfo/members#xmlname) is equals to the `xmlName` specified; otherwise a null reference (Nothing in Visual Basic).

**Exceptions**

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

### GetDataTypes

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

Retrieves all [OpcDataTypeInfo](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcdatatypeinfo/) objects offered by the [IOpcTypeProvider](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.iopctypeprovider/).

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

```csharp
public OpcDataTypeInfo[] GetDataTypes()
```

</div>

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

```vbnet
Public Function GetDataTypes() As OpcDataTypeInfo()
```

</div>

**Returns**

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

An array that contains all [OpcDataTypeInfo](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcdatatypeinfo/) objects that are offered by the [IOpcTypeProvider](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.iopctypeprovider/).

### GetDataTypeSystem

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

| Overload | Description |
|---|---|
| [GetDataTypeSystem()](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeset/members#getdatatypesystem-noparams) | Retrieves the system used to describe the data types defined in the [OpcNodeSet](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeset/) using [Binary](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcencodingtype/#binary) as the type of encoding. |
| [GetDataTypeSystem(OpcEncodingType)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeset/members#getdatatypesystem-opc-uafx-opcencodingtype) | Retrieves the system used to describe the data types defined in the [OpcNodeSet](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeset/) using [OpcEncodingType](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcencodingtype/) specified by `encodingType` as the type of encoding. |

#### GetDataTypeSystem()

Retrieves the system used to describe the data types defined in the [OpcNodeSet](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeset/) using [Binary](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcencodingtype/#binary) as the type of encoding.

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

```csharp
public OpcDataTypeSystem GetDataTypeSystem()
```

</div>

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

```vbnet
Public Function GetDataTypeSystem() As OpcDataTypeSystem
```

</div>

**Returns**

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

An instance of the [OpcDataTypeSystem](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcdatatypesystem/) class which can be used to understand the structure of the data described for the [Binary](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcencodingtype/#binary) encoding.

#### GetDataTypeSystem(OpcEncodingType)

Retrieves the system used to describe the data types defined in the [OpcNodeSet](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeset/) using [OpcEncodingType](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcencodingtype/) specified by `encodingType` as the type of encoding.

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

```csharp
public OpcDataTypeSystem GetDataTypeSystem(OpcEncodingType encodingType)
```

</div>

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

```vbnet
Public Function GetDataTypeSystem(
    encodingType As OpcEncodingType) As OpcDataTypeSystem
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `encodingType` | [OpcEncodingType](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcencodingtype/) |  |

**Returns**

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

An instance of the [OpcDataTypeSystem](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcdatatypesystem/) class which can be used to understand the structure of the data described for the encoding specified.

### GetNode

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

Retrieves the [IOpcNodeInfo](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.iopcnodeinfo/) which is defined within this [OpcNodeSet](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeset/) and is known under the `nodeId` specified.

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

```csharp
public IOpcNodeInfo GetNode(OpcNodeId nodeId)
```

</div>

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

```vbnet
Public Function GetNode(nodeId As OpcNodeId) As IOpcNodeInfo
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `nodeId` | [OpcNodeId](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeid/) | The [OpcNodeId](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeid/) of the [IOpcNodeInfo](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.iopcnodeinfo/) instance to determine. |

**Returns**

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

An instance implementing the [IOpcNodeInfo](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.iopcnodeinfo/) interface its [Id](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.iopcnodeinfo/members#id) attribute is equals to the `nodeId` specified if found; otherwise a null reference (Nothing in Visual Basic).

**Exceptions**

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

### GetNodes

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

Retrieves a sequence of [IOpcNodeInfo](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.iopcnodeinfo/) of all nodes defined within this [OpcNodeSet](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeset/).

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

```csharp
public IEnumerable<IOpcNodeInfo> GetNodes()
```

</div>

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

```vbnet
Public Function GetNodes() As IEnumerable(Of IOpcNodeInfo)
```

</div>

**Returns**

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

An [IEnumerable&lt;T&gt;](https://learn.microsoft.com/dotnet/api/system.collections.generic.ienumerable-1) of instances implementing the [IOpcNodeInfo](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.iopcnodeinfo/) interface.

### GetNodeType

<span class="api-meta">4 overloads · since v2.9</span>

| Overload | Description |
|---|---|
| [GetNodeType(string)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeset/members#getnodetype-system-string)<span class="api-meta">since v2.9</span> | Retrieves the [OpcNodeTypeInfo](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodetypeinfo/) object which is known under the `name` specified. |
| [GetNodeType(OpcName)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeset/members#getnodetype-opc-uafx-opcname)<span class="api-meta">since v2.9</span> | Retrieves the [OpcNodeTypeInfo](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodetypeinfo/) object which is known under the `name` specified. |
| [GetNodeType(OpcNodeId)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeset/members#getnodetype-opc-uafx-opcnodeid)<span class="api-meta">since v2.9</span> | Retrieves the [OpcNodeTypeInfo](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodetypeinfo/) object which declares the type which is identified by the `typeId` specified. |
| [GetNodeType(Type)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeset/members#getnodetype-system-type)<span class="api-meta">since v2.9</span> | Retrieves the [OpcNodeTypeInfo](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodetypeinfo/) object which declares the type implemented by the `underlyingType` specified. |

#### GetNodeType(string)

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

Retrieves the [OpcNodeTypeInfo](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodetypeinfo/) object which is known under the `name` specified.

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

```csharp
public OpcNodeTypeInfo GetNodeType(string name)
```

</div>

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

```vbnet
Public Function GetNodeType(name As String) As OpcNodeTypeInfo
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `name` | [String](https://learn.microsoft.com/dotnet/api/system.string) | The [string](https://learn.microsoft.com/dotnet/api/system.string) to use to identify the [OpcNodeTypeInfo](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodetypeinfo/) object to retrieve. |

**Returns**

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

The [OpcNodeTypeInfo](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodetypeinfo/) object its [Name](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodetypeinfo/members#name) is equals (regarding its [Value](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcname/members#value)) to the `name` specified; otherwise a null reference (Nothing in Visual Basic).

**Exceptions**

| Exception | Condition |
|---|---|
| [ArgumentException](https://learn.microsoft.com/dotnet/api/system.argumentexception) | The `name` is equals [Empty](https://learn.microsoft.com/dotnet/api/system.string.empty). |
| [ArgumentNullException](https://learn.microsoft.com/dotnet/api/system.argumentnullexception) | The `name` is a null reference (Nothing in Visual Basic). |

#### GetNodeType(OpcName)

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

Retrieves the [OpcNodeTypeInfo](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodetypeinfo/) object which is known under the `name` specified.

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

```csharp
public OpcNodeTypeInfo GetNodeType(OpcName name)
```

</div>

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

```vbnet
Public Function GetNodeType(name As OpcName) As OpcNodeTypeInfo
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `name` | [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/) of the [OpcNodeTypeInfo](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodetypeinfo/) object to retrieve. |

**Returns**

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

The [OpcNodeTypeInfo](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodetypeinfo/) object its [Name](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodetypeinfo/members#name) is equals to the `name` specified; otherwise a null reference (Nothing in Visual Basic).

**Exceptions**

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

#### GetNodeType(OpcNodeId)

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

Retrieves the [OpcNodeTypeInfo](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodetypeinfo/) object which declares the type which is identified by the `typeId` specified.

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

```csharp
public OpcNodeTypeInfo GetNodeType(OpcNodeId typeId)
```

</div>

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

```vbnet
Public Function GetNodeType(typeId As OpcNodeId) As OpcNodeTypeInfo
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `typeId` | [OpcNodeId](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeid/) | The [OpcNodeId](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeid/) which identifies the [OpcNodeTypeInfo](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodetypeinfo/) to retrieve. |

**Returns**

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

The [OpcNodeTypeInfo](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodetypeinfo/) object which is known under the `typeId` specified or a null reference (Nothing in Visual Basic) if there doesn't exist a known [OpcNodeTypeInfo](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodetypeinfo/) object which is associated with the `typeId` specified.

**Exceptions**

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

#### GetNodeType(Type)

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

Retrieves the [OpcNodeTypeInfo](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodetypeinfo/) object which declares the type implemented by the `underlyingType` specified.

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

```csharp
public OpcNodeTypeInfo GetNodeType(Type underlyingType)
```

</div>

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

```vbnet
Public Function GetNodeType(underlyingType As Type) As OpcNodeTypeInfo
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `underlyingType` | [Type](https://learn.microsoft.com/dotnet/api/system.type) | The [Type](https://learn.microsoft.com/dotnet/api/system.type) which implements the [OpcNodeTypeInfo](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodetypeinfo/) to retrieve. |

**Returns**

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

The [OpcNodeTypeInfo](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodetypeinfo/) object which declares the `underlyingType` specified or a null reference (Nothing in Visual Basic) if there isn't a [OpcNodeTypeInfo](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodetypeinfo/) object associated with the `underlyingType` specified.

**Exceptions**

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

### GetNodeTypes

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

Retrieves all [OpcNodeTypeInfo](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodetypeinfo/) objects offered by the [IOpcTypeProvider](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.iopctypeprovider/).

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

```csharp
public OpcNodeTypeInfo[] GetNodeTypes()
```

</div>

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

```vbnet
Public Function GetNodeTypes() As OpcNodeTypeInfo()
```

</div>

**Returns**

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

An array that contains all [OpcNodeTypeInfo](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodetypeinfo/) objects that are offered by the [IOpcTypeProvider](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.iopctypeprovider/).

### GetNodeTypeSystem

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

Retrieves the system used to describe the node types defined in the [OpcNodeSet](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeset/).

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

```csharp
public OpcNodeTypeSystem GetNodeTypeSystem()
```

</div>

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

```vbnet
Public Function GetNodeTypeSystem() As OpcNodeTypeSystem
```

</div>

**Returns**

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

An instance of the [OpcNodeTypeSystem](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodetypesystem/) class which can be used to understand the structure of the nodes defined.

### Load

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

| Overload | Description |
|---|---|
| [Load(string)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeset/members#load-system-string)<span class="api-meta">static</span> | Creates a new [OpcNodeSet](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeset/) instance from the file specified by `filePath`. |
| [Load(OpcContext, string)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeset/members#load-opc-uafx-opccontext-system-string)<span class="api-meta">static · since v2.50</span> | Creates a new [OpcNodeSet](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeset/) instance within the `context` from the file specified by `filePath`. |
| [Load(string, OpcNodeSetLoadOptions)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeset/members#load-system-string-opc-uafx-opcnodesetloadoptions)<span class="api-meta">static · since v2.40</span> | Creates a new [OpcNodeSet](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeset/) instance from the file specified by `filePath` using the further defined load `options`. |
| [Load(OpcContext, string, OpcNodeSetLoadOptions)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeset/members#load-opc-uafx-opccontext-system-string-opc-uafx-opcnodesetloadoptions)<span class="api-meta">static · since v2.50</span> | Creates a new [OpcNodeSet](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeset/) instance within the `context` from the file specified by `filePath` using the further defined load `options`. |
| [Load(Stream)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeset/members#load-system-io-stream)<span class="api-meta">static</span> | Creates a new [OpcNodeSet](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeset/) instance from the contents in the `stream` specified. |
| [Load(OpcContext, Stream)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeset/members#load-opc-uafx-opccontext-system-io-stream)<span class="api-meta">static · since v2.50</span> | Creates a new [OpcNodeSet](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeset/) instance within the `context` from the contents in the `stream` specified. |

**Exceptions (all overloads)**

| Exception | Condition |
|---|---|
| [InvalidDataException](https://learn.microsoft.com/dotnet/api/system.io.invaliddataexception) | The node set specified does not provide any namespace information. |

#### Load(string)

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

Creates a new [OpcNodeSet](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeset/) instance from the file specified by `filePath`.

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

```csharp
public static OpcNodeSet Load(string filePath)
```

</div>

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

```vbnet
Public Shared Function Load(filePath As String) As OpcNodeSet
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `filePath` | [String](https://learn.microsoft.com/dotnet/api/system.string) | The path to the file from which the [OpcNodeSet](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeset/) is to be created. |

**Returns**

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

A new instance of the [OpcNodeSet](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeset/) class that represents the contents of the file.

**Exceptions**

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

#### Load(OpcContext, string)

<span class="api-meta">static · since v2.50</span>

Creates a new [OpcNodeSet](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeset/) instance within the `context` from the file specified by `filePath`.

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

```csharp
public static OpcNodeSet Load(OpcContext context, string filePath)
```

</div>

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

```vbnet
Public Shared Function Load(
    context As OpcContext,
    filePath As String) As OpcNodeSet
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `context` | [OpcContext](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opccontext/) | The [OpcContext](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opccontext/) to use to load the [OpcNodeSet](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeset/). |
| `filePath` | [String](https://learn.microsoft.com/dotnet/api/system.string) | The path to the file from which the [OpcNodeSet](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeset/) is to be created. |

**Returns**

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

A new instance of the [OpcNodeSet](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeset/) class that represents the contents of the file.

**Exceptions**

| Exception | Condition |
|---|---|
| [ArgumentException](https://learn.microsoft.com/dotnet/api/system.argumentexception) | The `filePath` is an empty string. |
| [ArgumentNullException](https://learn.microsoft.com/dotnet/api/system.argumentnullexception) | The `context` or `filePath` is a null reference (Nothing in Visual Basic). |

#### Load(string, OpcNodeSetLoadOptions)

<span class="api-meta">static · since v2.40</span>

Creates a new [OpcNodeSet](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeset/) instance from the file specified by `filePath` using the further defined load `options`.

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

```csharp
public static OpcNodeSet Load(string filePath, OpcNodeSetLoadOptions options)
```

</div>

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

```vbnet
Public Shared Function Load(
    filePath As String,
    options As OpcNodeSetLoadOptions) As OpcNodeSet
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `filePath` | [String](https://learn.microsoft.com/dotnet/api/system.string) | The path to the file from which the [OpcNodeSet](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeset/) is to be created. |
| `options` | [OpcNodeSetLoadOptions](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodesetloadoptions/) | A combination of different [OpcNodeSetLoadOptions](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodesetloadoptions/) to use to load the node-set file. |

**Returns**

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

A new instance of the [OpcNodeSet](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeset/) class that represents the contents of the file.

**Exceptions**

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

#### Load(OpcContext, string, OpcNodeSetLoadOptions)

<span class="api-meta">static · since v2.50</span>

Creates a new [OpcNodeSet](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeset/) instance within the `context` from the file specified by `filePath` using the further defined load `options`.

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

```csharp
public static OpcNodeSet Load(
    OpcContext context,
    string filePath,
    OpcNodeSetLoadOptions options)
```

</div>

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

```vbnet
Public Shared Function Load(
    context As OpcContext,
    filePath As String,
    options As OpcNodeSetLoadOptions) As OpcNodeSet
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `context` | [OpcContext](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opccontext/) | The [OpcContext](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opccontext/) to use to load the [OpcNodeSet](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeset/). |
| `filePath` | [String](https://learn.microsoft.com/dotnet/api/system.string) | The path to the file from which the [OpcNodeSet](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeset/) is to be created. |
| `options` | [OpcNodeSetLoadOptions](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodesetloadoptions/) | A combination of different [OpcNodeSetLoadOptions](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodesetloadoptions/) to use to load the node-set file. |

**Returns**

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

A new instance of the [OpcNodeSet](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeset/) class that represents the contents of the file.

**Exceptions**

| Exception | Condition |
|---|---|
| [ArgumentException](https://learn.microsoft.com/dotnet/api/system.argumentexception) | The `filePath` is an empty string. |
| [ArgumentNullException](https://learn.microsoft.com/dotnet/api/system.argumentnullexception) | The `context` or `filePath` is a null reference (Nothing in Visual Basic). |

#### Load(Stream)

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

Creates a new [OpcNodeSet](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeset/) instance from the contents in the `stream` specified.

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

```csharp
public static OpcNodeSet Load(Stream stream)
```

</div>

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

```vbnet
Public Shared Function Load(stream As Stream) As OpcNodeSet
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `stream` | [Stream](https://learn.microsoft.com/dotnet/api/system.io.stream) | The [Stream](https://learn.microsoft.com/dotnet/api/system.io.stream) which contains the data from which the [OpcNodeSet](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeset/) is to be created. |

**Returns**

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

A new instance of the [OpcNodeSet](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeset/) class that represents the contents of the `stream`.

**Exceptions**

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

#### Load(OpcContext, Stream)

<span class="api-meta">static · since v2.50</span>

Creates a new [OpcNodeSet](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeset/) instance within the `context` from the contents in the `stream` specified.

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

```csharp
public static OpcNodeSet Load(OpcContext context, Stream stream)
```

</div>

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

```vbnet
Public Shared Function Load(
    context As OpcContext,
    stream As Stream) As OpcNodeSet
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `context` | [OpcContext](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opccontext/) | The [OpcContext](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opccontext/) to use to load the [OpcNodeSet](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeset/). |
| `stream` | [Stream](https://learn.microsoft.com/dotnet/api/system.io.stream) | The [Stream](https://learn.microsoft.com/dotnet/api/system.io.stream) which contains the data from which the [OpcNodeSet](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeset/) is to be created. |

**Returns**

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

A new instance of the [OpcNodeSet](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeset/) class that represents the contents of the `stream`.

**Exceptions**

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

### Parse

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

| Overload | Description |
|---|---|
| [Parse(string)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeset/members#parse-system-string)<span class="api-meta">static</span> | Creates a new [OpcNodeSet](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeset/) instance from the [string](https://learn.microsoft.com/dotnet/api/system.string) specified by `data`. |
| [Parse(OpcContext, string)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeset/members#parse-opc-uafx-opccontext-system-string)<span class="api-meta">static · since v2.50</span> | Creates a new [OpcNodeSet](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeset/) instance within the `context` from the [string](https://learn.microsoft.com/dotnet/api/system.string) specified by `data`. |

**Exceptions (all overloads)**

| Exception | Condition |
|---|---|
| [ArgumentException](https://learn.microsoft.com/dotnet/api/system.argumentexception) | The `data` is an empty string. |
| [ArgumentNullException](https://learn.microsoft.com/dotnet/api/system.argumentnullexception) | The `data` is a null reference (Nothing in Visual Basic). |
| [InvalidDataException](https://learn.microsoft.com/dotnet/api/system.io.invaliddataexception) | The node set specified does not provide any namespace information. |

#### Parse(string)

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

Creates a new [OpcNodeSet](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeset/) instance from the [string](https://learn.microsoft.com/dotnet/api/system.string) specified by `data`.

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

```csharp
public static OpcNodeSet Parse(string data)
```

</div>

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

```vbnet
Public Shared Function Parse(data As String) As OpcNodeSet
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `data` | [String](https://learn.microsoft.com/dotnet/api/system.string) | The [string](https://learn.microsoft.com/dotnet/api/system.string) that contains the node set data. |

**Returns**

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

#### Parse(OpcContext, string)

<span class="api-meta">static · since v2.50</span>

Creates a new [OpcNodeSet](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeset/) instance within the `context` from the [string](https://learn.microsoft.com/dotnet/api/system.string) specified by `data`.

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

```csharp
public static OpcNodeSet Parse(OpcContext context, string data)
```

</div>

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

```vbnet
Public Shared Function Parse(
    context As OpcContext,
    data As String) As OpcNodeSet
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `context` | [OpcContext](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opccontext/) | The [OpcContext](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opccontext/) to use to load the [OpcNodeSet](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeset/). |
| `data` | [String](https://learn.microsoft.com/dotnet/api/system.string) | The [string](https://learn.microsoft.com/dotnet/api/system.string) that contains the node set data. |

**Returns**

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

### Save

<span class="api-meta">2 overloads · since v2.11</span>

| Overload | Description |
|---|---|
| [Save(string)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeset/members#save-system-string)<span class="api-meta">since v2.11</span> | Writes this [OpcNodeSet](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeset/) as a node set XML document to the file specified by the `filePath`. |
| [Save(Stream)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeset/members#save-system-io-stream)<span class="api-meta">since v2.11</span> | Writes this [OpcNodeSet](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeset/) as a node set XML document to the `stream` specified. |

#### Save(string)

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

Writes this [OpcNodeSet](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeset/) as a node set XML document to the file specified by the `filePath`.

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

```csharp
public void Save(string filePath)
```

</div>

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

```vbnet
Public Sub Save(filePath As String)
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `filePath` | [String](https://learn.microsoft.com/dotnet/api/system.string) | The path to the file this [OpcNodeSet](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeset/) is to be written to. |

**Exceptions**

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

**Remarks**

An existing file is overwritten.

#### Save(Stream)

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

Writes this [OpcNodeSet](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeset/) as a node set XML document to the `stream` specified.

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

```csharp
public void Save(Stream stream)
```

</div>

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

```vbnet
Public Sub Save(stream As Stream)
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `stream` | [Stream](https://learn.microsoft.com/dotnet/api/system.io.stream) | The [Stream](https://learn.microsoft.com/dotnet/api/system.io.stream) this [OpcNodeSet](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeset/) is to be written to. |

**Exceptions**

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

### TryParse

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

| Overload | Description |
|---|---|
| [TryParse(string, out OpcNodeSet)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeset/members#tryparse-system-string-opc-uafx-opcnodeset-ref)<span class="api-meta">static</span> | Determines whether a [string](https://learn.microsoft.com/dotnet/api/system.string) is a valid [OpcNodeSet](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeset/). |
| [TryParse(OpcContext, string, out OpcNodeSet)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeset/members#tryparse-opc-uafx-opccontext-system-string-opc-uafx-opcnodeset-ref)<span class="api-meta">static · since v2.50</span> | Determines whether a [string](https://learn.microsoft.com/dotnet/api/system.string) within the `context` is a valid [OpcNodeSet](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeset/). |

#### TryParse(string, out OpcNodeSet)

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

Determines whether a [string](https://learn.microsoft.com/dotnet/api/system.string) is a valid [OpcNodeSet](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeset/).

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

```csharp
public static bool TryParse(string data, out OpcNodeSet nodeSet)
```

</div>

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

```vbnet
Public Shared Function TryParse(
    data As String,
    nodeSet As OpcNodeSet) As Boolean
```

</div>

**Parameters**

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

**Returns**

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

The value true if the specified `data` is a valid [OpcNodeSet](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeset/); otherwise the value false.

#### TryParse(OpcContext, string, out OpcNodeSet)

<span class="api-meta">static · since v2.50</span>

Determines whether a [string](https://learn.microsoft.com/dotnet/api/system.string) within the `context` is a valid [OpcNodeSet](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeset/).

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

```csharp
public static bool TryParse(
    OpcContext context,
    string data,
    out OpcNodeSet nodeSet)
```

</div>

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

```vbnet
Public Shared Function TryParse(
    context As OpcContext,
    data As String,
    nodeSet As OpcNodeSet) As Boolean
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `context` | [OpcContext](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opccontext/) | The [OpcContext](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opccontext/) to use to load the [OpcNodeSet](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeset/). |
| `data` | [String](https://learn.microsoft.com/dotnet/api/system.string) | The [string](https://learn.microsoft.com/dotnet/api/system.string) to validate. |
| `nodeSet` | out [OpcNodeSet](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeset/) | The [OpcNodeSet](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeset/) version of the [string](https://learn.microsoft.com/dotnet/api/system.string). |

**Returns**

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

The value true if the specified `data` is a valid [OpcNodeSet](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeset/); otherwise the value false.

**Exceptions**

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