获取当前运行程序上一级目录指定文件夹,没有就创建文件夹

//获取当前运行程序上一级目录PDF文件夹 
private string txtPath = System.AppDomain.CurrentDomain.BaseDirectory + "PDF\";
//如果该文件下没有PDF文件夹就创建该文件夹
if (!Directory.Exists(txtPath))
            {
                Directory.CreateDirectory(txtPath);
            }
原文地址:https://www.cnblogs.com/yuanshuo/p/14636999.html