# OpcClient.GetDataTypeSystem Method

<dl class="api-definition">
<dt>Type</dt>
<dd><a href="./">OpcClient</a></dd>
<dt>Namespace</dt>
<dd><a href="../namespaces/opc.uafx.client">Opc.UaFx.Client</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">OpcClient Members</a></dd>
<dt>Also in</dt>
<dd>Opc.UaFx.Client</dd>
</dl>

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

Retrieves the system used to describe the data exchanged via OPC UA using the type of encoding configured by the client and supported by the endpdoint of the server connected to.

<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 exchanged using a specific type of encoding (see [OpcEncodingType](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcencodingtype/)).

**Exceptions**

| Exception | Condition |
|---|---|
| [InvalidOperationException](https://learn.microsoft.com/dotnet/api/system.invalidoperationexception) | The requested operation is currently not supported. |
| [LicenseException](https://learn.microsoft.com/dotnet/api/system.componentmodel.licenseexception) | The license is expired. |
| [ObjectDisposedException](https://learn.microsoft.com/dotnet/api/system.objectdisposedexception) | The object has been disposed of. |
| [OpcException](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcexception/) | The service execution failed upon different circumstances; for more details see exception details. |

**Remarks**

Querying the data type system may fail in case there [MaxByteStringLength](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opctransport/members#maxbytestringlength) and [MaxMessageSize](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opctransport/members#maxmessagesize) are exceeded. The transport configuration needs to be adjusted to query larger type systems.

The [OpcDataTypeSystem](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcdatatypesystem/) offered represents by default the data type system defined in address space of the server and its data type information is queried on-demand using different request operations. This "overhead" can be overcome using an offline stored [OpcNodeSet](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeset/) which needs to be loaded and assigned to the [NodeSet](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcclient/nodeset) property of the current [OpcClient](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcclient/).

In case there [NodeSet](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcclient/nodeset) property has been set to an instance of the [OpcNodeSet](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeset/) class the offered [OpcDataTypeSystem](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcdatatypesystem/) expresses the data type information contained in the [NodeSet](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcclient/nodeset) configured.
