开发者

How to Reflect on the main app from a DLL with .NET?

I have a D开发者_JAVA技巧LL. from which I would like to get the app's name. The following code, called from the DLL, returns the DLL's full name:

string assemblyFullUncPath = 
    System.Reflection.Assembly.GetExecutingAssembly().GetName().CodeBase;

...so it isn't quite what I'm after. I could add an Assembly parameter, but I'd prefer not to. Is it possible?


Try Assembly.GetEntryAssembly().

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜