110,566
社区成员
发帖
与我相关
我的任务
分享
/// <summary>
/// 当前应用程序所在的路径
/// </summary>
public static string AssemblyPath
{
//get{ return Path.GetDirectoryName( Assembly.GetExecutingAssembly().Location );}
get { return Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().GetName().CodeBase); }
}
已经解决 这边获得的路径前面会包含一个file:\\所以每次在判断文件是否存在的时候直接抛出false,谢谢各位了