Programming Reference:LabelIndex Class
Initializes the LabelIndex object to a "trivial" index, i.e. labels are initialized to one-based numerical indices "1", "2", "3", ...
bool Exists(string Label)
Returns true if the specified label exists in the index, false otherwise.
Resets the index to a trivial index.
Adapts index size to the specified number of entries.
Writes/reads the index object from/to the specified stream. Stream representation is human readable, and corresponds to the way indices are specified in a parameter line. Beginning with an opening bracket, indices are listed in sequence, separated with space characters. Brackets and whitespace that are part of labels are encoded as described here.
bool IsTrivial (r)
True if all labels match string representations of one-based indices "1", "2", "3", ...
int Size (r)
The number of entries in the index, i.e. the number of indices that can be addressed by string labels.
The subscript operator  may be applied to a LabelIndex object with a string or a numerical argument.
In the first case, the zero-based index corresponding to the specified label will be returned, as in the following example:
int idx = Parameter( "MyParameter" ).RowLabels()["SecondRow"];
will return 1 if "SecondRow" exists as a string, and refers to the parameter's second row. For nonexistent labels, an index of zero will be returned, i.e. a nonexistent label will be mapped to the first entry.
In the second case, specifying a zero-based index will provide access to the string label associated with that index:
string label = Parameter( "MyParameter" ).RowLabels();
will return "SecondRow" if this is the label specified for the second entry.