Contains()

IMathElementCollection::Contains(System::SharedPtr<IMathElement>) method

Determines whether the collection contains a specific value.

virtual bool Aspose::Slides::MathText::IMathElementCollection::Contains(System::SharedPtr<IMathElement> item)=0

Arguments

ParameterTypeDescription
itemSystem::SharedPtr<IMathElement>The object to locate in the collection.

Return Value

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

Remarks

Example:

auto collection = System::MakeObject<MathBlock>(System::MakeObject<MathematicalText>(u"x"));
auto plusElement = System::MakeObject<MathematicalText>(u"+");
collection->Add(plusElement);
collection->Add(System::MakeObject<MathRadical>(System::MakeObject<MathematicalText>(u"x"), System::MakeObject<MathematicalText>(u"3")));
bool contains = collection->Contains(plusElement);

See Also