Skip to content

Instantly share code, notes, and snippets.

@bjoerntx
Created October 26, 2023 14:14
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/09aa94677f7d990abe26350e59e4eacd to your computer and use it in GitHub Desktop.
Save bjoerntx/09aa94677f7d990abe26350e59e4eacd to your computer and use it in GitHub Desktop.
private void CopyParagraphFormat(ParagraphFormat source, ParagraphFormat destination)
{
foreach (var property in typeof(ParagraphFormat).GetProperties())
{
object value = property.GetValue(source);
if (value != null && _positiveListParagraphFormat.Contains(property.Name))
{
property.SetValue(destination, value);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment