Contains

IMathElementCollection.Contains method

Определяет, содержит ли коллекция определенное значение.

public bool Contains(IMathElement item)
ПараметрТипОписание
itemIMathElementОбъект, который необходимо найти в коллекции.

Возвращаемое значение

true, еслиitemнайден в коллекции; в противном случае ложно.

Примеры

Пример:

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

Смотрите также