IndexOf

MathParagraph.IndexOf method

Détermine l’index d’un IMathBlock spécifique dans la collection.

public int IndexOf(IMathBlock mathBlock)
ParamètreTaperLa description
mathBlockIMathBlockL’élément à localiser dans la collection.

Return_Value

L’indice demathBlock s’il se trouve dans la collection ; sinon, -1.

Exemples

Exemple :

[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);

Voir également