Skip to content

Instantly share code, notes, and snippets.

@lukesarnacki
Created May 13, 2012 10:32
Show Gist options
  • Select an option

  • Save lukesarnacki/2687650 to your computer and use it in GitHub Desktop.

Select an option

Save lukesarnacki/2687650 to your computer and use it in GitHub Desktop.
List<Product> products;
products = (from item in xdoc.Descendants("object")
select new Product()
{
Name = item.Element("name").Value,
Description = item.Element("description").Value
}).ToList();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment