111,126
社区成员
发帖
与我相关
我的任务
分享using System.IO; public static void FTJL(string 字符串)
{
string path = @"C:\Documents and Settings\Administrator\桌面\文件名.txt";
if (!Directory.Exists(Path.GetDirectoryName(path)))
{
Directory.CreateDirectory(Path.GetDirectoryName(path));
}
StreamWriter sw = new StreamWriter(path, true);
sw.WriteLine(字符串);
sw.Close();
}