【发布时间】:2009-01-22 17:16:38
【问题描述】:
我有一个引用实用程序程序集的控制台应用程序 (MyProgram.EXE)。
在我的实用程序程序集中,我有这样的代码:
Dim asm As Assembly = Assembly.GetExecutingAssembly()
Dim location As String = asm.Location
Dim appName As String = System.IO.Path.GetDirectoryName(location)
Conole.WriteLine("AppName is: {0}", appName)
当我从MyProgram.EXE 调用它时,我收到“AppName is: Utilities.dll”
我想要的是“AppName is: MyProgram.EXE”
我做错了什么?
【问题讨论】:
-
哇,我的编辑中这些 br 是从哪里来的。
标签: .net vb.net system.reflection