Contains

MathBlock.Contains method

Détermine si la collection contient une valeur spécifique.

public bool Contains(IMathElement item)
ParamètreTaperLa description
itemIMathElementObjet à localiser dans la collection.

Return_Value

vrai siitem se trouve dans la collection; sinon, faux.

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")));
bool contains = mathBlock.Contains(plusElement);

Voir également