C# 获取当前路径

 1 System.Environment.CurrentDirectory;
 2 "E:\\Svn\\ManageSystem.WinForm\\bin\\Debug"
 3 System.Windows.Forms.Application.StartupPath
 4 "E:\\Svn\\ManageSystem.WinForm\\bin\\Debug"
 5 System.Diagnostics.Process.GetCurrentProcess().MainModule.FileName
 6 "E:\\Svn\\ManageSystem.WinForm\\bin\\Debug\\ManageSystem.WinForm.vshost.exe"
 7 System.AppDomain.CurrentDomain.BaseDirectory
 8 "E:\\Svn\\ManageSystem.WinForm\\bin\\Debug\\"
 9 System.IO.Directory.GetCurrentDirectory()
10 "E:\\Svn\\ManageSystem.WinForm\\bin\\Debug"
11 System.AppDomain.CurrentDomain.SetupInformation.ApplicationBase
12 "E:\\Svn\\ManageSystem.WinForm\\bin\\Debug\\"
13 this.GetType().Assembly.Location
14 "E:\\Svn\\ManageSystem.WinForm\\bin\\Debug\\ManageSystem.WinForm.exe"
15 System.Windows.Forms.Application.ExecutablePath
16 "E:\\Svn\\ManageSystem.WinForm\\bin\\Debug\\ManageSystem.WinForm.EXE"

没啥说的,直接看代码吧。

posted @ 2013-10-24 14:09  zhuhc  阅读(154)  评论(0编辑  收藏  举报