想新建一个xml文件,并写入内容。代码如下:File.Create("abc.xml");XmlTextWriter x = new XmlTextWriter("abc.xml",System.Text.Encoding.UTF8);运行第2句时,报错说"The process cannot access the file'abc.xmm' because it is being used by another process."怎么解决呢?多谢!
调试欢乐多
stream.Close();
没有关闭文件,怎么读写。
写一个文件也没有你这样写的吧!
System.Xml.XmlDocument doc = new XmlDocument();
............
doc.Save()