【发布时间】:2011-09-09 21:49:54
【问题描述】:
给定一个通过反射找到的 .NET 类型对象,考虑到 C# 类型别名等,是否可以将该类型漂亮地打印或反编译为 C# 声明?
例如,
Int32 -> int
String -> string
Nullable<Int32> -> int?
List<au.net.ExampleObject> -> List<ExampleObject>
我希望能够打印出接近源代码中最初编写的方法。
如果.NET 框架中什么都没有,是否有第三方库?我可能会看看ILSpy。
【问题讨论】:
标签: c# reflection types decompiling pretty-print