string path = @"C:\User\yunxiang\agent.txt";
if (!File.Exists(path))
{
using (StreamWriter sw = File.CreateText(path))
{
sw.WriteLine("Hello");
sw.WriteLine("And");
sw.WriteLine("Welcome");
}
}
”“未能找到路径 @"C:\User\yunxiang\agent.txt"的一部分”是什么意思啊?
if (!File.Exists(path))
{
using (StreamWriter sw = File.CreateText(path))
{
sw.WriteLine("Hello");
sw.WriteLine("And");
sw.WriteLine("Welcome");
}
}
”“未能找到路径 @"C:\User\yunxiang\agent.txt"的一部分”是什么意思啊?
检查下c盘下面有User目录吗?User目录下有yunxiang目录吗?
Directory.exists