Skip to content

Instantly share code, notes, and snippets.

@bjoerntx
Created February 8, 2024 15:04
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/93b0c1ef418bd940307d095d9f52add9 to your computer and use it in GitHub Desktop.
Save bjoerntx/93b0c1ef418bd940307d095d9f52add9 to your computer and use it in GitHub Desktop.
private static void RenameMergeBlocks(SubTextPartCollection subTextParts,
string oldColumnName,
string newColumnName)
{
// iterate through all SubTextParts
foreach (SubTextPart subTextPart in subTextParts)
{
// check if the SubTextPart is a merge block
if (subTextPart.Name == "txmb_" + oldColumnName)
{
// rename the SubTextPart
subTextPart.Name = "txmb_" + newColumnName;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment