IndexOf
MathBlock.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#]
MathBlock mathBlock = new MathBlock(new MathematicalText("x"));
MathematicalText plusElement = new MathematicalText("+");
mathBlock.Add(plusElement);
mathBlock.Add(new MathRadical(new MathematicalText("x"), new MathematicalText("3")));
int index = mathBlock.IndexOf(plusElement);
See Also
- interface IMathElement
- class MathBlock
- namespace Aspose.Slides.MathText
- assembly Aspose.Slides