# MTEnumerator

An object that holds information about an enumerator (name) and a collection of values (BSTRs).

## Program ID

Metratech.MTEnumerator.1

## MTEnumerator Methods

AddValue | Adds a value to this enumerator.
ClearValue | Removes a value from this enumerator.
ClearValues | Removes all values from this enumerator.
ElementAt | Returns a value at a specified position.
NumValues | Returns a number of values in this enumerator.
WriteSet | Internal use only.

## MTEnumerator Properties

Enumspace | Gets/sets name for enum space this enumerator belongs to.
Enumtype | Gets/sets name for enum type this enumerator belongs to.
FQN | Internal use only.
Name | Gets/sets name for this enumerator.

## Example

Example to be provided in a future release of this online help system.

# Method Detail

## AddValue

Adds a value to this enumerator.

### Visual Basic Syntax

Sub AddValue(value As String)

### C++ Syntax

[id(2), helpstring("method AddValue")] HRESULT AddValue(BSTR value);

### Arguments

value

Value to add.

## ClearValue

Removes a value from this enumerator.

### Visual Basic Syntax

Sub ClearValue(value As String)

### C++ Syntax

[id(9), helpstring("method ClearValue")] HRESULT ClearValue(BSTR value);

### Arguments

value

Value to clear.

## ClearValues

Removes all values from this enumerator.

### Visual Basic Syntax

Sub ClearValues()

### C++ Syntax

[id(10), helpstring("method ClearValues")] HRESULT ClearValues();

## ElementAt

Returns a value at a specified position.

### Visual Basic Syntax

Function ElementAt(_MIDL_0021 As Long) As String

### C++ Syntax

[id(7), helpstring("method ElementAt")] HRESULT ElementAt([in] int, [out, retval] BSTR* pEnumValue);

### Arguments

pos

Position index.

### Return Value

Value at position pos.

## NumValues

Returns a number of values in this enumerator.

### Visual Basic Syntax

Function NumValues() As Long

### C++ Syntax

[id(6), helpstring("method NumValues")] HRESULT NumValues([out, retval] int*);

### Return Value

Number of values.

## WriteSet

Internal use only.

### Visual Basic Syntax

Sub WriteSet(pSet As IMTConfigPropSet)

# Property Detail

## Enumspace

Gets/sets name for enum space this enumerator belongs to.

This property is read/writeable.

### Visual Basic Syntax

Property Enumspace As String

### C++ Syntax

[propget, id(3), helpstring("property EnumSpace")] HRESULT EnumSpace([out, retval] BSTR *pVal);

[propput, id(3), helpstring("property EnumSpace")] HRESULT EnumSpace([in] BSTR newVal);

### Return Value

BSTR* val

Enum space name.

## Enumtype

Gets/sets name for enum type this enumerator belongs to.

This property is read/writeable.

### Visual Basic Syntax

Property EnumType As String

### C++ Syntax

[propget, id(4), helpstring("property EnumType")] HRESULT EnumType([out, retval] BSTR *pVal);

[propput, id(4), helpstring("property EnumType")] HRESULT EnumType([in] BSTR newVal);

### Return Value

BSTR* val

Enum type name.

## FQN

Internal use only.

### Visual Basic Syntax

Property FQN As String

### C++ Syntax

[propget, id(8), helpstring("property FQN")] HRESULT FQN([out, retval] BSTR *pVal);

### Return Value

BSTR* val

FQN for this enumerator.

## Name

Gets/sets name for this enumerator.

This property is read/writeable.

### Visual Basic Syntax

Property name As String

### C++ Syntax

[propget, id(1), helpstring("property Name")] HRESULT Name([out, retval] BSTR *pVal);

[propput, id(1), helpstring("property Name")] HRESULT Name([in] BSTR newVal);

### Arguments

BSTR val

Enumerator name.

### Return Value

BSTR* val

Enumerator name.