CopyTo()

IMathElementCollection::CopyTo(System::ArrayPtr<System::SharedPtr<IMathElement>>, int32_t) method

Copy to specified array.

virtual void Aspose::Slides::MathText::IMathElementCollection::CopyTo(System::ArrayPtr<System::SharedPtr<IMathElement>> array, int32_t arrayIndex)=0

Arguments

ParameterTypeDescription
arraySystem::ArrayPtr<System::SharedPtr<IMathElement>>Array to copy to.
arrayIndexint32_tIndex to begin copying.

Remarks

Example:

System::SharedPtr<IMathElementCollection> 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")));
auto destinationArray = System::MakeArray<System::SharedPtr<Aspose::Slides::MathText::IMathElement>>(collection->get_Count());
collection->CopyTo(destinationArray, 0);

See Also