Set Slide Width and Height

I would like to set the height & width of slides in a presntation but could find any fuction/property to set the same.
Can somebody share the code to do this. I tried example from below link but the property is read only.

presentationEx.SlideSize.Type = SlideSizeTypeEx.Custom;
presentationEx.SlideSize.Size = new SizeF(new PointF(currentWidth, heightSize));

@Abhishek0586,

I have observed your requirements and suggest you to visit this API reference link for more information about setting slide size.

presentation.SlideSize.SetSize(myLoadedPresentation.SlideSize.Size.Width, myLoadedPresentation.SlideSize.Size.Height, SlideSizeScaleType.EnsureFit);

I hope the shared information will be helpful.