C# crashes on save (doc.Save(PATH);)
问题 This program crashes on debug and highlights the "doc.Save(PATH);" at the end of the code. I am trying to save the variables cookieScore , additionAddition , and additionMultiplier into an XML file. I am getting information about it from here "http://visualcsharptutorials.com/net-framework/writing-xml-file" private XmlDocument doc; string PATH = @"C:\sample.xml"; private void saveBtn_Click(object sender, EventArgs e) { doc = new XmlDocument(); if (!System.IO.File.Exists(PATH)) {