如何获取DLL中包含的类和方法的数量? [英] How to get the count of classes and methods contained in a DLL ?

查看:94
本文介绍了如何获取DLL中包含的类和方法的数量?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

how to get the count of classes and methods contained in a DLL





I知道ildasm.exe工具会告诉我,但在我需要手动检查2 dll有命名空间,classess,方法等的情况下。



请建议一个最好的方法,可以给我点数?



我尝试过:



我尝试了微软的illdasm.exe工具,尝试通过命令行和它的计数进行交互



I know the ildasm.exe tool will show me, but in scenarios where i need to a manual check on 2 dll having count of namespaces,classess,methods etc.

Please suggest a best approach which can give me the count ?

What I have tried:

I tried illdasm.exe tool from Microsoft, trying out there would be a away to interact via commandline and the count from it

推荐答案

ildasm.exe允许您显示.NET模块的内容,但AFAIK没有内置统计功能。



幸运的是,您可以使用 System.Reflection命名空间 [ ^ ]为此建立自己的程序。您可以在CP上搜索反射,并获取大量有关其用法的示例。
ildasm.exe allows you to display a .NET module's contents, but AFAIK there is no statistical functionality built into it.

Fortunately, you can use objects in System.Reflection Namespace[^] to build your own program for that. You can search here on CP for "Reflection" and get plenty of examples about its usage.


这篇关于如何获取DLL中包含的类和方法的数量?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆