# OpcDataTypeMapperAttribute Class

> Reference: Defines data type mappings supported by an implementation of the IOpcDataTypeMapper interface.

<span class="api-meta">since v2.27</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">OpcDataTypeMapperAttribute Members</a></dd>
<dt>Also in</dt>
<dd>Opc.UaFx.Client</dd>
</dl>

Defines data type mappings supported by an implementation of the [IOpcDataTypeMapper](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.iopcdatatypemapper/) interface.

## Syntax

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

```csharp
public class OpcDataTypeMapperAttribute : Attribute
```

</div>

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

```vbnet
<AttributeUsage(AttributeTargets.Class, AllowMultiple:=True, Inherited:=False)>
Public Class OpcDataTypeMapperAttribute
    Inherits Attribute
```

</div>

## Inheritance

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

## Constructors

| Name | Description |
|---|---|
| [OpcDataTypeMapperAttribute](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcdatatypemapperattribute/members#opcdatatypemapperattribute) | Initializes a new instance of the OpcDataTypeMapperAttribute class using the `sourceType` and `targetType` supported by the data type mapper. |

## Properties

| Name | Description |
|---|---|
| [SourceType](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcdatatypemapperattribute/members#sourcetype) | Gets the [Type](https://learn.microsoft.com/dotnet/api/system.type) from an [object](https://learn.microsoft.com/dotnet/api/system.object) can be mapped to the [TargetType](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcdatatypemapperattribute/members#targettype) using the mapper this attribute applies to. |
| [TargetType](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcdatatypemapperattribute/members#targettype) | Gets the [Type](https://learn.microsoft.com/dotnet/api/system.type) to that an [object](https://learn.microsoft.com/dotnet/api/system.object) is mapped using this mapper this attribute applies to. |

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

## Applies to

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