using System; using System.Collections.Generic; using System.Text; using System.IO; using System.Reflection; using System.Windows.Forms; namespace PDAForm.Comm { public class MyFileManager { /// /// 读取当前应用程序的路径 /// /// public static string GetApplicationPath() { string path; path = Path.GetDirectoryName(Assembly.GetExecutingAssembly().GetName().CodeBase); path = path.Replace(@"file:\", ""); if (path.Substring(path.Length - 1, 1) != @"\") { path += @"\"; } return path; } } }