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
UpdateGameAttr(id , bal);
private void UpdateGameAttr(int id, int bal)
{
XDocument gmaes = XDocument.Load(@"D:\xxx\xxx\Game.xml");
XElement upd = (from games in games.Descendants("savegame")
where games.Element("IdNumber").Value == id.ToString()
select games).Single();
upd.Element("balance").Value = bal.ToString();
gmaes.Save(@"D:\xxxx\xxx\Game.xml");
}