Equals

BaseSlide.Equals method

Determines whether the two IBaseSlide instances are equal. Returning value is calculated based on slide’s structure and static content. Two slides are equal if all shapes, styles, texts, animation and other settings. etc. are equal. The comparison doesn’t take into account unique identifier values, e.g. SlideId and dynamic content, e.g. current date value in Date Placeholder.

public bool Equals(IBaseSlide slide)
ParameterTypeDescription
slideIBaseSlideThe IBaseSlide to compare with the current IBaseSlide.

Return Value

true if the specified IBaseSlide is equal to the current IBaseSlide; otherwise, false.

Examples

The following example shows how to compare two slides.

[C#]
using (Presentation presentation1 = new Presentation("AccessSlides.pptx"))
{
	using (Presentation presentation2 = new Presentation("HelloWorld.pptx"))
	{
		for (int i = 0; i < presentation1.Masters.Count; i++)
		{
			for (int j = 0; j < presentation2.Masters.Count; j++)
			{
				if (presentation1.Masters[i].Equals(presentation2.Masters[j]))
					Console.WriteLine(string.Format("SomePresentation1 MasterSlide#{0} is equal to SomePresentation2 MasterSlide#{1}", i, j));
			}
		}
	}
}

See Also