# OpcEnum Class

> Reference: Defines an enumeration data type at runtime, e.g. to provide it by a server using Create.

<span class="api-meta">since v2.53</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">OpcEnum Members</a></dd>
</dl>

Defines an enumeration data type at runtime, e.g. to provide it by a server using [Create](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcdatatypenode/members#create-opc-uafx-iopcdatatypebuilder).

## Syntax

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

```csharp
public class OpcEnum
```

</div>

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

```vbnet
Public Class OpcEnum
```

</div>

## Inheritance

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

## Implements

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

## Properties

| Name | Description |
|---|---|
| [Id](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcenum/members#id) | Gets the identifier of the enumeration. |
| [Name](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcenum/members#name) | Gets the name of the enumeration. |
| [Type](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcenum/members#type) | Gets the way the members of the enumeration are described. |

## Methods

| Name | Description |
|---|---|
| [CreateTypeInfo](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcenum/members#createtypeinfo) | Creates the type information of the enumeration using the `context` and the `typeId` specified. |
| [DefineStrings](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcenum/members#definestrings)<span class="api-meta">static · 4 overloads</span> | Defines an enumeration whose members are described by enumeration strings (see [Strings](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcenumtype/#strings)). |
| [DefineValues](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcenum/members#definevalues)<span class="api-meta">static · 4 overloads</span> | Defines an enumeration whose members are described by enumeration values (see [Values](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcenumtype/#values)). |
| [GetFields](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcenum/members#getfields) | Returns the fields of the enumeration. |
| [GetNames](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcenum/members#getnames) | Returns the names of the fields of the enumeration. |
| [GetValues](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcenum/members#getvalues)<span class="api-meta">3 overloads</span> | Retrieves the enumeration values from the enumeration type specified `T`. |

## Applies to

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