IndexOf

IMathBlockCollection.IndexOf method

Determines the index of a specific IMathBlock in collection.

public int IndexOf(IMathBlock item)
ParameterTypeDescription
itemIMathBlockThe item to locate in the collection.

Return Value

The index of item if found in the collection; otherwise, -1.

Examples

Example:

[C#]
IMathBlockCollection blockCollection = new MathParagraph();
IMathBlock block = new MathBlock(new MathematicalText("y"));
blockCollection.Add(block);
int index = blockCollection.IndexOf(block);

See Also