I recently started learning C# and I ran into a problem using XML.Linq to store data. I hope the question is understandable as I am not familiar with all the co
XML.Linq
With using System.Xml.Linq; it becomes
using System.Xml.Linq;
var doc = XElement.Load(fileName); var saveGame = doc .Element("savegames") .Elements("savegame") .Where(e => e.Element("IdNumber").Value == "2") .Single(); saveGame.Element("balance").Value = "50"; doc.Save(fileName);