有人吗?帮我看一下这个问题好吗?
云孤天 2004-04-05 09:12:30 我的代码是这样的
XmlDocument XmlFile = new XmlDocument();
if (!(File.Exists(@"D:\Config.xml")))
{
XmlDeclaration declaration = XmlFile.CreateXmlDeclaration("1.0","utf-8",null);
XmlFile.AppendChild(declaration);
XmlFile.Save(@"D:\Config.xml");
}
代码执行到XmlFile.Save(@"D:\Config.xml");的时候出错,提示系统异常,这是怎么回事啊?