共有俩种解决方式
使用using system.IO;
第一种:
if (!File.Exists(path))
{
File.Create(path).Close();
}
第二种:
if (!File.Exists(path))
{
using(File.Create(path))
{
}
}
共有俩种解决方式
使用using system.IO;
第一种:
if (!File.Exists(path))
{
File.Create(path).Close();
}
第二种:
if (!File.Exists(path))
{
using(File.Create(path))
{
}
}