Contains()

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

Determines whether the collection contains a specific value.

bool Aspose::Slides::MathText::MathBlock::Contains(System::SharedPtr<IMathElement> item) override

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 mathBlock = System::MakeObject<MathBlock>(System::MakeObject<MathematicalText>(u"x"));
auto plusElement = System::MakeObject<MathematicalText>(u"+");
mathBlock->Add(plusElement);
mathBlock->Add(System::MakeObject<MathRadical>(System::MakeObject<MathematicalText>(u"x"), System::MakeObject<MathematicalText>(u"3")));
bool contains = mathBlock->Contains(plusElement);

See Also