Skip to content
< All Topics

List and modify Assembly names

Changing part of Assembly name for all assemblies which name contains “UC1”

int startindex = 5;
string changefrom = "MC02";
string changeto = "MC01";
foreach (var item in Experior.Core.Assemblies.Assembly.Items.Values)
{
    if (item.Name.Contains("UC1"))
    {
        int lenght = item.Name.Length - startindex;
        Log.Write("Assembly name = " + item.Name.Substring(startindex, lenght));
        Log.Write("Assembly name = " + item.Name.Replace(changefrom, changeto));
        item.Name = item.Name.Replace(changefrom, changeto);
        item.Name = "=" + item.Name;
        Log.Write("bool " + item.Name.Replace(changefrom, changeto));
    }
}
Was this article helpful?
How can we improve this article?
Please submit the reason for your vote so that we can improve the article.