2013年1月6日
摘要: 参考一:C# 如何获取某用户的“我的文档”的目录Console.WriteLine(System.Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments));System.Environment.GetFolderPath 方法获取指向由指定枚举标识的系统特殊文件夹的路径。public static string GetFolderPath( Environment.SpecialFolder folder)Environment.SpecialFolder 枚举说明: 成员名称 说明 ApplicationData 目. 阅读全文
posted @ 2013-01-06 08:48 fery 阅读(468) 评论(0) 推荐(0) 编辑
摘要: //获取包含清单的已加载文件的路径或 UNC 位置。 public static string sApplicationPath = Assembly.GetExecutingAssembly ( ).Location; //result: X:\xxx\xxx\xxx.dll (.dll文件所在的目录+.dll文件名) //获取当前进程的完整路径,包含文件名(进程名)。 string str = this.GetType ( ).Assembly.Location; //result: X:\xxx\xxx\xxx.exe (.exe文件所在的目录+.exe文件名) //获取新的 Proc. 阅读全文
posted @ 2013-01-06 08:45 fery 阅读(149) 评论(0) 推荐(0) 编辑