2
有沒有辦法通過CIL獲取類間的類型並將其更改爲public?將內部類更改爲公共(CIL,Mono.Cecil)
AssemblyDefinition x = AssemblyDefinition.ReadAssembly("x.dll");
TypeDefinition type = x.MainModule.GetType("Class");
有沒有辦法通過CIL獲取類間的類型並將其更改爲public?將內部類更改爲公共(CIL,Mono.Cecil)
AssemblyDefinition x = AssemblyDefinition.ReadAssembly("x.dll");
TypeDefinition type = x.MainModule.GetType("Class");
AssemblyDefinition adef = AssemblyDefinition.ReadAssembly("x.dll");
TypeDefinition tdef = adef.MainModule.GetType("Class");
tdef.IsPublic = true;
adef.MainModule.Write("x_updated.dll");