.NET中三种获取当前路径的代码
Web编程
HttpContext.Current.Server.MapPath("FileName")
Windows编程
System.Environment.CurrentDirectory
Mobile编程
Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().GetName().CodeBase);
Web编程
HttpContext.Current.Server.MapPath("FileName")
Windows编程
System.Environment.CurrentDirectory
Mobile编程
Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().GetName().CodeBase);