I have a List<> which I have managed to write into file. Now I am trying to read the same file and write it back to List<>. Is there a
List<>
An easy way is
using System; using System.Linq; using System.Xml.Linq; public class Test { static void Main() { string xml = "12"; XDocument doc = XDocument.Parse(xml); List list = doc.Root.Elements("id") .Select(element => element.Value) .ToList(); } }