# MTProperties

A collection of MTProperty objects.

To view an object model diagram that includes MTProperties, click here.

## Program ID

Metratech.MTProperties.1

## Methods

Add | Adds a new MTProperty based on metadata.
Exist | Tests to determine whether an item exists in the collection.
ToString | Dumps property and all its attribute values to a string (for debugging)

## Properties

_NewEnum | Returns a COM Enumerator over this collection. Allows use of "for each".
Item | Returns a MTProperty in the collection by position or name.
Count | Returns the number of items in the collection.

# Method Detail

## Add

This method adds a new MTProperty based on metadata.

### Visual Basic Syntax

Add(MetaData As MTPropertyMetaData) As MTProperty

### C++ Syntax

HRESULT Add([in] IMTPropertyMetaData* apMetaData, [out, retval] IMTProperty** aProp);

## Exist

This method tests to determine whether an item exists in the collection.

### Visual Basic Syntax

Exist(Key As Variant) As Boolean

### C++ Syntax

HRESULT Exist([in] VARIANT aKey, [out, retval] VARIANT_BOOL* pVal);

## ToString

This method dumps property and all its attribute values to a string (for debugging).

### Visual Basic Syntax

ToString() As String

### C++ Syntax

HRESULT ToString([out, retval] BSTR* pVal);

# Property Detail

## _NewEnum

This method returns a COM Enumerator over this collection. Allows use of "for each"..

### Visual Basic Syntax

_NewEnum() As IUnknown

### C++ Syntax

HRESULT _NewEnum([out, retval] IUnknown**pVal);

## Item

This method returns a MTProperty in the collection by position or name.

### Visual Basic Syntax

Item(Key As Variant) As Variant

### C++ Syntax

HRESULT Item([in] VARIANT aKey, [out, retval] VARIANT *pVal);

## Count

This method returns the number of items in the collection.

### Visual Basic Syntax

Count() As Long

### C++ Syntax

HRESULT Count([out, retval] long *pVal);