Contains

MathBlock.Contains-Methode

Bestimmt, ob die Sammlung einen bestimmten Wert enthält.

public bool Contains(IMathElement item)
ParameterTypBeschreibung
itemIMathElementDas Objekt, das in der Sammlung lokalisiert werden soll.

Rückgabewert

true, wenn item in der Sammlung gefunden wird; andernfalls false.

Beispiele

Beispiel:

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

Siehe auch