IndexOf

IMathElementCollection.IndexOf méthode

Détermine l’index d’un élément mathématique spécifique dans la collection.

public int IndexOf(IMathElement item)
ParamètreTypeDescription
itemIMathElementL’élément à localiser dans la collection.

Valeur de retour

L’index de item s’il est trouvé dans la collection ; sinon, -1.

Exemples

Exemple:

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

Voir aussi