Remove()

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

Removes the first occurrence of a specific object from the collection.

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

Arguments

ParameterTypeDescription
itemSystem::SharedPtr<IMathElement>The object to remove from the collection.

Return Value

true if item was successfully removed from the collection; otherwise, false. This method also returns false if item is not found in the original collection.

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")));
mathBlock->Remove(plusElement);

See Also