# OpcEncoding Class

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

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

Identifies how data is encoded on the wire and therefore describes in which way information is serialized or deserialized.

## Syntax

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

```csharp
public class OpcEncoding
```

</div>

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

```vbnet
Public Class OpcEncoding
```

</div>

## Inheritance

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

## Implements

<ul class="api-implements">
<li><a href="https://learn.microsoft.com/dotnet/api/system.iequatable-1">IEquatable</a>&lt;OpcEncoding&gt;</li>
</ul>

## Properties

| Name | Description |
|---|---|
| [DefaultBinary](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcencoding/members#defaultbinary)<span class="api-meta">static</span> | Gets the foundation defined encoding used by default to encode information using the binary representation (known as 'OPC UA Binary') of the information to serialize or deserialize. |
| [DefaultXml](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcencoding/members#defaultxml)<span class="api-meta">static</span> | Gets the foundation defined encoding used by default to encode information using a XML-based serialization format (known as 'OPC UA XML') to serialize or deserialize information. |
| [Id](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcencoding/members#id) | Gets the identifier of the node which refers to a specific [OpcEncodingType](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcencodingtype/) (defined by [Type](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcencoding/members#type)) used to encode information. |
| [Namespace](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcencoding/members#namespace) | Gets the namespace within the encoding has been defined. |
| [Type](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcencoding/members#type) | Gets a value which identifies the underlying logic used to encode information. |

## Methods

| Name | Description |
|---|---|
| [All](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcencoding/members#all)<span class="api-meta">static · 2 overloads</span> | Retrieves for each supported [OpcEncodingType](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcencodingtype/) a new OpcEncoding while each uses the `id` specified. |
| [Binary](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcencoding/members#binary)<span class="api-meta">static · 3 overloads</span> | Retrieves a new OpcEncoding which uses the `id` specified to define an encoding which uses the logic used for binary data encoding. |
| [Default](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcencoding/members#default)<span class="api-meta">static</span> | Retrieves the according default OpcEncoding which is used for the `encodingType` specified. |
| [Empty](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcencoding/members#empty)<span class="api-meta">static · since v2.50</span> | Returns an empty array of the type OpcEncoding. |
| [Equals](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcencoding/members#equals)<span class="api-meta">2 overloads</span> | Determines whether the specified `other` is equal to this OpcEncoding. |
| [GetHashCode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcencoding/members#gethashcode)<span class="api-meta">override</span> | Retrieves a hash code for this OpcEncoding. |
| [GetType](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcencoding/members#gettype)<span class="api-meta">static · since v2.9</span> | Determines the expressed type of encoding using the information encoded in the `encodingName` specified. |
| [Of](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcencoding/members#of)<span class="api-meta">static</span> | Selects the first OpcEncoding in `encodings` which defines an encoding which uses the `encodingType` specified as the logic used to encode data. |
| [ToString](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcencoding/members#tostring)<span class="api-meta">override</span> | Returns a string representing the encoding described. |
| [Xml](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcencoding/members#xml)<span class="api-meta">static · 3 overloads</span> | Retrieves a new OpcEncoding which uses the `id` specified to define an encoding which uses the logic used for XML data encoding. |

## Operators

| Name | Description |
|---|---|
| [Equality](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcencoding/members#op-equality)<span class="api-meta">static</span> | Returns a value indicating whether two instance of OpcEncoding are equal. |
| [Inequality](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcencoding/members#op-inequality)<span class="api-meta">static</span> | Returns a value indicating whether two instances of OpcEncoding are not equal. |

## Applies to

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