IndexOf

Méthode MathBlock.IndexOf

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#]
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);

Voir aussi