Contains

MathBlock.Contains method

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

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

Rückgabewert

wahr, wennitem befindet sich in der Sammlung; andernfalls falsch.

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