Hello,
To get slide by position, use this utility function instead of accessing them directly from collection.
static SlideEx GetSlideByPosition(PresentationEx pres, int position)
{
if (position <= 0)
throw new Exception("Position should start from 1");
if (pres.Slides.Count < position)
throw new Exception("Position must not be greater than number of slides");
SlideEx retSld = null;
foreach (SlideEx sld in pres.Slides)
{
if (sld.SlideNumber == position)
retSld = sld;
}
return retSld;
}
Many Thanks and Kind Regards,
Shakeel Faiz
Support Developer
Aspose Sialkot Team
Contact UsAspose - The .NET and Java Component Publisher
Keep in touch! We're on
Twitter and
Facebook