# OpcEnumAttribute Members

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

<dl class="api-definition">
<dt>Type</dt>
<dd><a href="./">OpcEnumAttribute</a></dd>
<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>Also in</dt>
<dd>Opc.UaFx.Client</dd>
</dl>

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

## Constructors

### OpcEnumAttribute

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

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

```csharp
public OpcEnumAttribute(OpcEnumType type)
```

</div>

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

```vbnet
Public Sub New(type As OpcEnumType)
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `type` | [OpcEnumType](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcenumtype/) | One of the members defined by the [OpcEnumType](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcenumtype/) enumeration. |

## Properties

### 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.

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

```csharp
public bool AutoDescribe { get; set; }
```

</div>

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

```vbnet
Public Property AutoDescribe As Boolean
```

</div>

**Property value**

[Boolean](https://learn.microsoft.com/dotnet/api/system.boolean)

The value true if the description (if unspecified) is to be automatically generated; otherwise the value false. The default value is true if [Type](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcenumattribute/members#type) is equals to [Default](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcenumtype/#default) or [Values](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcenumtype/#values).

**Remarks**

This option only applies to enumerations which are laid out using enumeration values (see [Values](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcenumtype/#values)).

### 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.

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

```csharp
public bool GroupMembers { get; set; }
```

</div>

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

```vbnet
Public Property GroupMembers As Boolean
```

</div>

**Property value**

[Boolean](https://learn.microsoft.com/dotnet/api/system.boolean)

The value true if the members with the same value are to be grouped into one member; otherwise the value false. The default value is true if [Type](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcenumattribute/members#type) is equals to [Default](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcenumtype/#default) or [Strings](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcenumtype/#strings).

**Remarks**

This option only applies to enumerations which are laid out using enumeration strings (see [Strings](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcenumtype/#strings)).

### Members

Gets or sets the criterions to use to select the appropriate members of an enumeration type to respect to definde the enumeration members.

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

```csharp
public OpcEnumMemberOrigins Members { get; set; }
```

</div>

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

```vbnet
Public Property Members As OpcEnumMemberOrigins
```

</div>

**Property value**

[OpcEnumMemberOrigins](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcenummemberorigins/)

A combination of the members defined by the [OpcEnumMemberOrigins](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcenummemberorigins/) enumeration.

### Type

Gets the way used to define the enumeration using its members.

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

```csharp
public OpcEnumType Type { get; }
```

</div>

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

```vbnet
Public ReadOnly Property Type As OpcEnumType
```

</div>

**Property value**

[OpcEnumType](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcenumtype/)

One of the members defined by the [OpcEnumType](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcenumtype/) enumeration.
