ICSharpCode.Decompiler + Mono.Cecil -> How to generate code for a single method?
问题 I'm able to use Mono.Cecil and ICSharpCode.Decompiler to generate the code for a type or an assembly. But if I try to generate the code for a single method I'll get an error "Object reference not set to an instance of an object." Can you guys give me any hints about this? Thanks ahead for all the help. Code to generate code for all the types inside an assembly: DirectoryInfo di = new DirectoryInfo(appPath); FileInfo[] allAssemblies = di.GetFiles("*.dll"); foreach (var assemblyFile in