c# - Return a value from void method -
is there way somehow store value void method? in particular, trying animation effect data particular shape in powerpoint presentation , use later:
object r = presentation.slides[2].shapes[3].pickupanimation(); but compiler says
cannot implicitly convert type 'object' 'void'
of course, can not edit method , change return value.
if method not return value or have ref/out parameter, there's no way store "result", there is no result.
you should check whether there method or property returns value need, task you're asking can not achieved without modifying method itself.
i'm not vsto expert, i'm pretty sure there properties or other methods apart pickupanimation return animation effect parameters.
to copy same animation parameters shape, use applyanimation method, in:
presentation.slides[2].shapes[3].pickupanimation(); presentation.slides[2].shapes[4].applyanimation(); it's clipboard animation parameters. docs:
applies last picked animation shape object.
Comments
Post a Comment