如何修改.NET程序集中的类实现?(How to modify a class implementation in a .NET assembly?)

我有一个没有强符号的.NET程序集,是否可以将指定的类修补为:

改变方法的实现 添加方法 添加字段

I have a .NET assembly without strong sign, is it possible to patch a specified class to:

change a method's implementation add methods add fields

最满意答案

Mono.Cecil等库可以通过将它们解析为MSIL容器来访问程序集的每个位。 然后,您可以轻松修改自己喜欢的内容。 所以这个问题不适合StackOverflow,而是谷歌。

Libraries such as Mono.Cecil give you access to every bits of an assemblies by parsing them as MSIL containers. You can then easily modify whatever you like. So this question is not suitable for StackOverflow, but Google.

更多推荐