CodePaste Logo
New Snippet New Snippet Recent Snippets Recent Snippets My Snippets My Snippets Web Code Search Snippets Search
Sign inor Register
Language: C#

LINQ - Select a subset of an object as a new list

310 Views
Copy Code Show/Hide Line Numbers
var list = new PolicyPerilService()
    .GetAll()
    .Select(item => new { Code = item.Code, Description = item.Description})
    .ToList();
by Cat
  June 01, 2010 @ 4:58am
Tags:

Add a comment


Report Abuse
brought to you by:
West Wind Techologies



If you find this site useful and use it frequently please consider making a donation to support this free service.
Donate