c# - Saving string with xml -
why if save variables , load them companyname , playername this: system.xml.xmlelement, instead of write? other variables works fine. struggling while, appreciate help, thanks. public void loadgameprefs() { string filepath = "c:/users/gameprefs.xml"; xmldocument xmldoc = new xmldocument(); if(file.exists (filepath)) { xmldoc.load(filepath); xmlnodelist transformlist = xmldoc.getelementsbytagname("gameprefs"); foreach (xmlnode transforminfo in transformlist) { xmlnodelist transformcontent = transforminfo.childnodes; foreach (xmlnode transformitems in transformcontent) { if(transformitems.name == "firststart") { firststart = bool.parse(transformitems.innertext); } if(transformitems.name == "drawfirstgui") { drawfi...