IndexOf
MathParagraph.IndexOf method
Determines the index of a specific IMathBlock in collection.
public int IndexOf(IMathBlock mathBlock)
Parameter | Type | Description |
---|---|---|
mathBlock | IMathBlock | The item to locate in the collection. |
Return Value
The index of mathBlock if found in the collection; otherwise, -1.
Examples
Example:
[C#]
IAutoShape shape = slide.Shapes.AddMathShape(x, y, width, height);
IMathParagraph mathParagraph = (shape.TextFrame.Paragraphs[0].Portions[0] as MathPortion).MathParagraph;
IMathBlock block = new MathBlock(new MathematicalText("y"));
mathParagraph.Add(block);
int index = mathParagraph.IndexOf(block);
See Also
- interface IMathBlock
- class MathParagraph
- namespace Aspose.Slides.MathText
- assembly Aspose.Slides