# CMxVariantArray Class

Namespace: `ArchestrA.Toolkit`

CMxVariantArray is derived from CMxArray and provides support for Variant Array Attributes.

**Syntax**

```csharp
public class CMxVariantArray : CMxArray<CMxValue)
```

## CMxVariantArray Properties

### Value Property

Provides a property to get and set the value as a CMxValue array.

**Syntax**

```csharp
public CMxValue [] Value { get; set; }
```

**Returns**

CMxValue [ ]

### Property to Get and Set the CMxValue Value using the [ ] Operator

Provides a property to get and set the CMxValue of an element using [ ] operator.

**Syntax**

```csharp
public CMxValue this[short i] { get; set; }
```

**Returns**

CMxValue

## CMxVariantArray Constructors

### CMxVariantArray Constructor int

Provides a constructor to initialize the array to a default length.

**Syntax**

```csharp
public CMxVariantArray(int length);
```

**Parameters**

**`length`**

[in] integer value that holds the array length.

### CMxVariantArray Constructor CMxValue[ ]

Provides a constructor to initialize the class with a CMxValue array default value.

**Syntax**

```csharp
public CMxVariantArray (CMxValue[] value);
```

**Parameters**

**`value`**

[in] CMxValue[ ] value to be set.

### CMxVariantArray Constructor SupportWrapper, string

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

**Syntax**

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

**Parameters**

**`_wrapper`**

[in] SupportWrapper.

**`_attributeRef`**

[in] string value that holds the attribute reference.

## CMxVariantArray Methods

### Set Method

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

**Syntax**

```csharp
public void Set(CMxVariantArray newValue);
```

**Parameters**

**`newValue`**

[in] CMxVariantArray value to be set.

### SetDataType Method

Provides a method to set the value of the MxDataType of the Attribute.

**Syntax**

```csharp
public void SetDataType(MxDataType dtype);
```

**Parameters**

**`dtype`**

[in] MxDataType value.

## CMxVariantArray Operator Overloads

### CMxValue Operator Overload CMxVariantArray

Provides an operator that converts from CMxVariantArray to CMxValue.

**Syntax**

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

**Parameters**

**`val`**

[in] CMxVariantArray value to convert to CMxValue.

**Returns**

CMxValue

### CMxVariantArray Operator Overload CMxValue

Provides an operator that converts from CMxValue to CMxVariantArray.

**Syntax**

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

**Parameters**

**`val`**

[in] CMxValue value to convert to CMxVariantArray.

**Returns**

CMxVariantArray
