public static List<Chaves> ListarChaves() { List<Chaves> chaves = new List<Chaves>(); XElement xml = XElement.Load("Chaves.xml"); foreach (XElement x in xml.Elements()) { Chaves c = new Chaves() { chave = x.Attribute("idChave").Value, }; chaves.Add(c); } return chaves.ToList(); }
public static List <Chaves> ListarChaves() { List <Chaves> chaves = new List <Chaves>(); XElement xml = XElement.Load("Chaves.xml"); foreach (XElement x in xml.Elements()) { Chaves c = new Chaves() { chave = x.Attribute("idChave").Value, }; chaves.Add(c); } return(chaves.ToList()); }