如何在programiticaly中从dll查找所有函数名称 [英] how to find all the function name from a dll in programiticaly
本文介绍了如何在programiticaly中从dll查找所有函数名称的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个Rxnorm dll
我在页面中有下拉列表
我想在programiticaly中显示该dll的下拉列表中的所有函数名称
请帮助我
i have a Rxnorm dll
and i have drop down list in a page
i want to show all the functions name in that drop down list from that dll in programiticaly
please help me
推荐答案
只有当此DLL实际上是某些.NET 程序集的可执行文件 module 时,您才能这样做.我>.您需要的是反射:
http://en.wikipedia.org/wiki/Reflection_%28computer_programming%29 [ ^ ].
从程序集文件反映完整的元数据非常简单.您需要的只是标准文档.从System.Type
上的文档开始,并在使用时使用所有反射类型/成员上的链接.请参阅:
http://msdn.microsoft.com/en-us/library/system.type%28v = vs.110%29.aspx [ http://msdn.microsoft.com/en-us/library/system.reflection%28v = vs.110%29.aspx [
You can do it only if this DLL is actually an executable module of some .NET assembly. What you need is reflection:
http://en.wikipedia.org/wiki/Reflection_%28computer_programming%29[^].
Reflection of the complete metadata from an assembly file is fairly simple. All you need is standard documentation. Start with documentation onSystem.Type
and use links on all the reflection types/members as you go. Please see:
http://msdn.microsoft.com/en-us/library/system.type%28v=vs.110%29.aspx[^],
http://msdn.microsoft.com/en-us/library/system.reflection%28v=vs.110%29.aspx[^].
Load the assembly from file, using it, get its types, for each/some types, get either methods or all members and chose methods, and so on. Just act by documentation, it is really easy.
—SA
这篇关于如何在programiticaly中从dll查找所有函数名称的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文