# OpcEnumAttribute Class

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

Defines a custom configuration to use to define an enumeration and its members.

## Syntax

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

```csharp
public class OpcEnumAttribute : Attribute
```

</div>

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

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

</div>

## Inheritance

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

## Constructors

| Name | Description |
|---|---|
| [OpcEnumAttribute](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcenumattribute/members#opcenumattribute) | Initializes a new instance of the OpcEnumAttribute class using the `type` of enumeration to define. |

## Properties

| Name | Description |
|---|---|
| [AutoDescribe](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcenumattribute/members#autodescribe) | Gets or sets a value indicating whether the description of enumeration values is to be automatically generated using the name of the members which can be combined to represent the value of the member. |
| [GroupMembers](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcenumattribute/members#groupmembers) | Gets or sets a value indicating whether the members are to be grouped by their value to unambiguously use one numeric value used by different members. |
| [Members](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcenumattribute/members#members) | Gets or sets the criterions to use to select the appropriate members of an enumeration type to respect to definde the enumeration members. |
| [Type](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcenumattribute/members#type) | Gets the way used to define the enumeration using its members. |

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

## Applies to

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