Contains

MathBlock.Contains method

Determines whether the collection contains a specific value.

public bool Contains(IMathElement item)
ParameterTypeDescription
itemIMathElementThe object to locate in the collection.

Return Value

true if item is found in the collection; otherwise, false.

Examples

Example:

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

See Also