While there are many examples of how to use ILDASM, I have yet to find any information as to how ILDASM populates its data. Can anyone please help shed some light on this for me?
Edit: I should mention that I am interested in doing this from C++.
它使用通用的 .NET 运行时支持接口从程序集中读取数据,例如IMetaDataAssemblyImport 。
获得洞察力的最佳方法是查看其源代码。这在SSCLI20 发行版中可用。安装后,导航到 clr/src/ildasm 子目录并进行查看。