namespace ConsoleApplication2
{
class Program
{
private const string FILE_name = @"C:\Users\PC-100\Desktop\zhang.txt";
static void Main(string[] args)
{
if (File.Exists(FILE_name))
{
Console.WriteLine("this alreday exists!");
Console.ReadLine();
return;
}
FileStream F = new FileStream(FILE_name, FileMode.Create);
BinaryWriter ww = new BinaryWriter(F);
ww.Write("this is my first file in c sharp!");
ww.Close();
F.Close();
}
}
}
this is my first file in c sharp!
就是前面为什么会莫名其妙有一个啊
txt文件,你直接写入就好,别用二进制流啊
没有啊,请如实反映情况