开发者

Modify IL code on the fly

I want to modify .Net IL code of an existing class on the fly. Is that possible somehow? I found some references to the .Net Profiling API, but according to the documentation it does not support self modifying applications. The main purpose would be to replace getters and setters of some pro开发者_Python百科perties. Any hint would be very appreciated.

cheers, Achim


I'd suggest you check out Mono Cecil. Don't think you can't use Mono binaries in your windows .NET application.

Cecil is like reflection on steroids. You can not only reflect over an assembly, but alter its IL and save the result.

Here's a decent webcast about doing this.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜