System.Reflection

余生长醉 提交于 2019-12-12 23:12:33

问题


let us consider im having an application AAA. From my application im loaded an assembly named as BBB.When im in BBB path, i need to get the AAA Assembly name at run time. how to accomplish this? Thanks in advance


回答1:


The call to:

Assembly.GetExecutingAssembly()

will return the assembly it's written in (the currently executing assembly). Or in your case, maybe you'll need:

Assembly.GetEntryAssembly()

to get the executable assembly (the assembly that the application was started with).



来源:https://stackoverflow.com/questions/4276084/system-reflection

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!