We use this code in our solution:
Paragraphs paragraphs = null;
if (shape.Placeholder != null && shape.IsTextHolder)
paragraphs = ((TextHolder)shape.Placeholder).Paragraphs;
Sometimes this gives the following exception:
System.InvalidCastException: Unable to cast object of type 'Aspose.Slides.Placeholder' to type 'Aspose.Slides.TextHolder'.
First I'm checking if the shape is a TextHolder (shape.IsTextHolder) but sometimes the object stored in "shape.Placeholder" isn't of type TextHolder anyway. Is this a bug? How can this be explained? If it's not a TextHolder what is it then?
Thanks for clearing my confusion.