我使用以下代码将幻灯片添加到演示文稿中,然后我想将其背景颜色设置为演示文稿中已存在的其中一张幻灯片的颜色:
presentation.Slides.AddSlide(presentation.Slides.Count + 1 presentation.Slides[presentation.Slides.Count].CustomLayout);
//set the last slide color to the color of the current slide
presentation.Slides[presentation.Slides.Count].Background.Fill.ForeColor.RGB = presentation.Slides[e].Background.Fill.ForeColor.RGB;
presentation.Save();
但是,颜色不会设置为红色。右侧的值为 255,这是我想要的,但左侧有 11675(在我设置颜色的行之前和之后)。如何解决这个问题?