# CMxCustomEnum Class

Namespace: `ArchestrA.Toolkit`

CMxCustomEnum is derived from CMxCommon and provides support for Enum Attributes.

**Syntax**

```csharp
public class CMxCustomEnum : CMxCommon
```

## CMxCustomEnum Properties

### Value Property

Provides a property to get and set the ordinal value as a short.

**Syntax**

```csharp
public short Value { get; set; }
```

**Returns**

short

### Text Property

Provides a property to get and set the text value as a string.

**Syntax**

```csharp
public string Text { get; set; }
```

**Returns**

string

## CMxCustomEnum Constructors

### CMxCustomEnum Constructor

Provides a default constructor.

**Syntax**

```csharp
public CMxCustomEnum();
```

### CMxCustomEnum Constructor (string, int)

Provides a constructor to initialize the class with the name of an array and its depth relative to the owning object.

**Syntax**

```csharp
public CMxCustomEnum(string arrayAttribute, int depth);
```

**Parameters**

**`arrayAttribute`**

[in] string value that holds the name of the string array attribute.

**`depth`**

[in] int value that holds the depth of the string array attribute primitive.

### CMxCustomEnum Constructor (SupportWrapper, string)

Provides a constructor to initialize the class for use in a primitive wrapper.

**Syntax**

```csharp
public CMxCustomEnum(SupportWrapper _wrapper, string _attributeRef);
```

**Parameters**

**`_wrapper`**

[in] SupportWrapper.

**`_attributeRef`**

[in] string value that holds the attribute reference name.

### CMxCustomEnum Constructor (string, int, short)

Provides a constructor to initialize the class with the name of an array, its depth relative to the owning object and the default ordinal as a short.

**Syntax**

```csharp
public CMxCustomEnum(string arrayAttribute, int depth, short val);
```

**Parameters**

**`arrayAttribute`**

String value that holds the name of the referenced string array attribute.

**`depth`**

Int value that holds the depth.

The depth assigned to the reference determines the location of the String Array reference (0 represents the local Primitive, -1 represents the Parent, -2 represents the Parents Parent and so on.)

**`val`**

Short value that holds the value index.

## CMxCustomEnum Method

### Set Method

Provides a method to set the value of the Attribute from a CMxCustomEnum.

**Syntax**

```csharp
public void Set(CMxCustomEnum val);
```

**Parameters**

**`val`**

[in] CMxCustomEnum instance value to be set.

## CMxCustomEnum Operator Overloads

### CMxValue Operator Overload

Provides an operator to convert a CMxCustomEnum into a CMxValue

**Syntax**

```csharp
public static implicit operator CMxValue(CMxCustomEnum val);
```

**Parameters**

**`val`**

[in] CMxCustomEnum value to convert to CMxValue.

**Returns**

CMxValue

### Short Operator Overload

Provides an operator to convert a CMxCustomEnum into a ordinal short.

**Syntax**

```csharp
public static implicit operator short(CMxCustomEnum val);
```

**Parameters**

**`val`**

[in] CMxCustomEnum value to convert to short.

**Returns**

short

### CMxCustomEnum Operator Overload (CMxValue)

Provides an operator to convert a CMxValue into a CMxCustomEnum.

**Syntax**

```csharp
public static implicit operator CMxCustomEnum(CMxValue val);
```

**Parameters**

**`val`**

[in] CMxValue value to convert to CMxCustomEnum.

**Returns**

CMxCustomEnum

### CMxCustomEnum Operator Overload (short)

Provides an operator to convert an ordinal short into a CMxCustomEnum.

**Syntax**

```csharp
public static implicit operator CMxCustomEnum(short x);
```

**Parameters**

**`x`**

[in] short value to convert to CMxCustomEnum.

**Returns**

CMxCustomEnum
