IndexOf()

IMathBlockCollection::IndexOf(System::SharedPtr<IMathBlock>) method

Determines the index of a specific IMathBlock in collection.

virtual int32_t Aspose::Slides::MathText::IMathBlockCollection::IndexOf(System::SharedPtr<IMathBlock> item)=0

Arguments

ParameterTypeDescription
itemSystem::SharedPtr<IMathBlock>The item to locate in the collection.

Return Value

The index of item if found in the collection; otherwise, -1.

Remarks

Example:

auto blockCollection = System::MakeObject<MathParagraph>();
auto block = System::MakeObject<MathBlock>(System::MakeObject<MathematicalText>(u"y"));
blockCollection->Add(block);
int32_t index = blockCollection->IndexOf(block);

See Also