Contains

IMathElementCollection.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#]
IMathElementCollection collection = new MathBlock(new MathematicalText("x"));
MathematicalText plusElement = new MathematicalText("+");
collection.Add(plusElement);
collection.Add(new MathRadical(new MathematicalText("x"), new MathematicalText("3")));
bool contains = collection.Contains(plusElement);

See Also