Skip to content

Instantly share code, notes, and snippets.

@bjoerntx
Created October 26, 2023 14:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bjoerntx/ed4e5ce4dbd1c452a6126c86e2b67e38 to your computer and use it in GitHub Desktop.
Save bjoerntx/ed4e5ce4dbd1c452a6126c86e2b67e38 to your computer and use it in GitHub Desktop.
private bool IsParagraphFormatEqual(ParagraphFormat format1, ParagraphFormat format2)
{
foreach (var property in typeof(ParagraphFormat).GetProperties())
{
if (_positiveListParagraphFormat.Contains(property.Name))
{
object value1 = property.GetValue(format1);
object value2 = property.GetValue(format2);
if (!object.Equals(value1, value2))
{
return false;
}
}
}
return true;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment