IndexOf
IMathElementCollection.IndexOf method
Determines the index of a specific math element in collection.
public int IndexOf(IMathElement item)
Parameter | Type | Description |
---|---|---|
item | IMathElement | The element to locate in the collection. |
Return Value
The index of item if found in the collection; otherwise, -1.
Examples
Example:
[C#]
IMathElementCollection collection = new MathBlock(new MathematicalText("x"));
MathematicalText plusElement = new MathematicalText("+");
collection.Add(plusElement);
collection.Add(new MathRadical(new MathematicalText("x"), new MathematicalText("3")));
int index = collection.IndexOf(plusElement);
See Also
- interface IMathElement
- interface IMathElementCollection
- namespace Aspose.Slides.MathText
- assembly Aspose.Slides