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

Provides metadata of a field declared by a data type.

## Syntax

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

```csharp
public class OpcDataFieldInfo
```

</div>

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

```vbnet
Public Class OpcDataFieldInfo
```

</div>

## Inheritance

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

## Implements

<ul class="api-implements">
<li><a href="../opc.uafx.iopcdatafieldinfo/">IOpcDataFieldInfo</a></li>
</ul>

## Properties

| Name | Description |
|---|---|
| [CustomAttributes](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcdatafieldinfo/members#customattributes)<span class="api-meta">virtual</span> | Gets an array of custom attributes associated with this field. |
| [DeclaringType](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcdatafieldinfo/members#declaringtype) | Gets the type that declares the current OpcDataFieldInfo. |
| [Documentation](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcdatafieldinfo/members#documentation)<span class="api-meta">virtual · since v2.9</span> | Gets any semantic information that would help a human to understand what is contained in the field. |
| [FieldType](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcdatafieldinfo/members#fieldtype) | Gets the type of value this field provides. |
| [IsOptional](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcdatafieldinfo/members#isoptional) | Gets a value indicating whether the current field might not necessarily exist in the object defined by the [DeclaringType](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcdatafieldinfo/members#declaringtype). |
| [Length](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcdatafieldinfo/members#length)<span class="api-meta">virtual</span> | Gets the length of the field expressed either explicit or implicit using a different OpcDataFieldInfo. |
| [LengthField](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcdatafieldinfo/members#lengthfield)<span class="api-meta">virtual</span> | Gets the OpcDataFieldInfo used to define the length of the current OpcDataFieldInfo. |
| [Name](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcdatafieldinfo/members#name) | Gets the name of the current OpcDataFieldInfo. |
| [ReflectedType](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcdatafieldinfo/members#reflectedtype) | Gets the type that was used to obtain this instance of OpcDataFieldInfo. |
| [Switch](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcdatafieldinfo/members#switch)<span class="api-meta">virtual</span> | Gets the switch condition which applies to the current OpcDataFieldInfo. |
| [SwitchField](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcdatafieldinfo/members#switchfield)<span class="api-meta">virtual</span> | Gets the OpcDataFieldInfo used to evaluate the [Switch](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcdatafieldinfo/members#switch) condition which applies to the current OpcDataFieldInfo. |

## Methods

| Name | Description |
|---|---|
| [GetLength](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcdatafieldinfo/members#getlength)<span class="api-meta">virtual · since v2.58</span> | Gets the maximum length of the specified dimension of the field as the definition of its data type states it. |
| [GetValue](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcdatafieldinfo/members#getvalue)<span class="api-meta">virtual</span> | Gets the value of the field supported by the given object `instance`. |
| [SetValue](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcdatafieldinfo/members#setvalue)<span class="api-meta">virtual</span> | Sets the value of the field supported by the given object `instance`. |
| [ToString](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcdatafieldinfo/members#tostring)<span class="api-meta">override</span> | Returns a [string](https://learn.microsoft.com/dotnet/api/system.string) representing the [Name](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcdatafieldinfo/members#name) and [FieldType](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcdatafieldinfo/members#fieldtype) of the current OpcDataFieldInfo. |

## Applies to

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