日期:2014-05-18 浏览次数:20751 次
创建目录
void CrateDir(string path)
{
System.IO.Directory.CreateDirectory(path);
}
CrateDir(@"C:\windows\aaa");
写入文件
void shuchu(string path,string info)
{
FileStream fs = new FileStream(path, FileMode.Create);
StreamWriter sw = new StreamWriter(fs);
sw.WriteLine(info);
sw.Flush();
sw.Close();
fs.Close();
}
shuchu(“C:\windows\a.txt”,"123");