MTSorted Property (MTNVS collection)

             

 

Sets, or returns, a value that indicates whether this collection’s elements are retrieved in lexical order.

 

Syntax

object.MTSorted [= Boolean]

The MTSorted property syntax has these parts:

Part

Description

object

An object expression that evaluates to an object in the Applies To list.

Boolean

A Boolean expression, as described in Settings.

 

Settings

The settings for boolean are:

Setting

Description

True

Items are retrieved from the collection in lexical order. This is the default

False

Items are retrieved from the collection in the order in which they were added.

 

Remarks

Setting this property controls all retrievals from this collection, including access through the For Each statement, fetching the MTItem property by number, and the MTDumpToString method.

Changing this property does not make any permanent change in the collection. You can set MTSorted = True to retrieve items in lexical order, and then set MTSorted = False to retrieve items in the order in which they were added, as many times as desired.

Lexical order is generally the same as alphabetical order. However, if the MTStyle property’s current setting includes pinvLocaleSensitive, lexical and alphabetical order may differ depending on locale.

Enabling Operational Intelligence