# OpcTypeEncodingFailedEventArgs Class

> Reference: Provides the event data for events of the delegate type OpcTypeEncodingFailedEventHandler.

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

Provides the event data for events of the delegate type [OpcTypeEncodingFailedEventHandler](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opctypeencodingfailedeventhandler/).

## Syntax

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

```csharp
public class OpcTypeEncodingFailedEventArgs : EventArgs
```

</div>

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

```vbnet
Public Class OpcTypeEncodingFailedEventArgs
    Inherits EventArgs
```

</div>

## Inheritance

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

## Implements

<ul class="api-implements">
<li><a href="https://learn.microsoft.com/dotnet/api/system.idisposable">IDisposable</a></li>
</ul>

## Properties

| Name | Description |
|---|---|
| [Data](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opctypeencodingfailedeventargs/members#data) | Gets the data which is tried to encode. |
| [Encoding](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opctypeencodingfailedeventargs/members#encoding) | Gets the type of encoding supported by the encoder used. |
| [Exception](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opctypeencodingfailedeventargs/members#exception) | Gets the [Exception](https://learn.microsoft.com/dotnet/api/system.exception) created or caught during the encoding process. |
| [FieldName](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opctypeencodingfailedeventargs/members#fieldname) | Gets the name of the field of an [Instance](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opctypeencodingfailedeventargs/members#instance) which is about to get encoded. |
| [FieldType](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opctypeencodingfailedeventargs/members#fieldtype) | Gets the type of the field being encoded. |
| [Instance](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opctypeencodingfailedeventargs/members#instance) | Gets the [object](https://learn.microsoft.com/dotnet/api/system.object) instance its data is being encoded. |
| [Message](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opctypeencodingfailedeventargs/members#message) | Gets the description of the encoding failure. |
| [Type](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opctypeencodingfailedeventargs/members#type) | Gets the type information used to encode the data of the [Instance](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opctypeencodingfailedeventargs/members#instance). |
| [TypeId](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opctypeencodingfailedeventargs/members#typeid) | Gets the identifier of the type being encoded. |
| [TypeIdAbsolute](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opctypeencodingfailedeventargs/members#typeidabsolute) | Gets the absolute [TypeId](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opctypeencodingfailedeventargs/members#typeid) (if available). |

## Methods

| Name | Description |
|---|---|
| [Dispose](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opctypeencodingfailedeventargs/members#dispose)<span class="api-meta">2 overloads</span> | Releases all resources used by the OpcTypeEncodingFailedEventArgs. |
| [GetData](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opctypeencodingfailedeventargs/members#getdata) | Retrieves a copy of the binary data in the [Stream](https://learn.microsoft.com/dotnet/api/system.io.stream) used by the encoder to encode the data. |
| [GetStackTrace](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opctypeencodingfailedeventargs/members#getstacktrace) | Retrieves an instance which summarizes the stack within the encoder until the failure has been produced. |
| [GetStream](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opctypeencodingfailedeventargs/members#getstream) | Retrieves a copy of the [Stream](https://learn.microsoft.com/dotnet/api/system.io.stream) used by the encoder to encode the data. |
| [ToString](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opctypeencodingfailedeventargs/members#tostring)<span class="api-meta">override</span> | Returns a [string](https://learn.microsoft.com/dotnet/api/system.string) representing the [Message](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opctypeencodingfailedeventargs/members#message) or the [Message](https://learn.microsoft.com/dotnet/api/system.exception.message) of the [Exception](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opctypeencodingfailedeventargs/members#exception) of the current OpcTypeEncodingFailedEventArgs. |

Inherits members from [EventArgs](https://learn.microsoft.com/dotnet/api/system.eventargs).

## Applies to

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