WinForm 在相对路径中自动新建文件夹
/// <summary>
/// 创建Conifg文件夹
/// </summary>
public static void CreadConfigFile()
{
try
{
string path = Application.StartupPath + "\\Config";
if (!File.Exists(path))//如果不存在就创建file文件夹
{
Directory.CreateDirectory(path);
}
}
catch (Exception ex)
{
throw ex;
}
}