版主呀!
private void buttonBaoCun_Click(object sender, System.EventArgs e){
FileInfo save=new FileInfo("save.txt");
using(StreamWriter sw=save.CreateText())
{
sw.WriteLine("获奖名单:");
}
using(StreamWriter sw=save.AppendText())
{
sw.WriteLine("序号:");
sw.WriteLine("姓名:");
sw.WriteLine("记录保存时间:{0}",save.CreationTime);
this.label3.Text="获奖人员名单已保存!";
}
this.dataSet11.Clear();
}
这段代码本来应该生成一个save.txt文件的,为什么不可以呀?请版主大哥指点!!