ISlideCollectionAddClone Method (ISlide, ISection)

Adds a copy of a specified slide to the end of the specified section.

Namespace:  Aspose.Slides
Assembly:  Aspose.Slides (in Aspose.Slides.dll) Version: 20.11.0.0 (20.11)
Syntax
ISlide AddClone(
	ISlide sourceSlide,
	ISection section
)

Parameters

sourceSlide
Type: Aspose.SlidesISlide
Slide to clone.
section
Type: Aspose.SlidesISection
Section for a new slide.

Return Value

Type: ISlide
New slide.
Exceptions
Examples
[C#]
using (IPresentation presentation = new Presentation())
{
    presentation.Slides[0].Shapes.AddAutoShape(ShapeType.Rectangle, 200, 50, 300, 100);
    presentation.Sections.AddSection("Section 1", presentation.Slides[0]);

    ISection section2 = presentation.Sections.AppendEmptySection("Section 2");
    presentation.Slides.AddClone(presentation.Slides[0], section2);

    // Now the second section contains a copy of the first slide.
}
See Also