获得程序当前目录

     DirectoryInfo sourceDirectory = new DirectoryInfo(Path.Combine(Path.GetFullPath(new FileInfo(Assembly.GetExecutingAssembly().Location).DirectoryName), "good"));

      

原文地址:https://www.cnblogs.com/gaoxianzhi/p/3817007.html