我正在使用XMLWriter在C#中的ConsoleApplication上创建XML结构。当我在VisualStudio中运行它时,但是当我从Windows命令(cmd)运行它时会出现问题
我已复制到另一个目录,但它没有创建“numberOfHouses.txt”
XmlWriterSettings settings = new XmlWriterSettings();
settings.Indent = true;
settings.OmitXmlDeclaration = true;
XmlWriter writer = XmlWriter.Create("numberOfHouses.txt", settings);
writer.WriteStartElement("CITY");
writer.WriteElementString("HOUSES","12");
writer.WriteEndElement();
writer.Close();
有什么建议吗?
感谢