var objList = (from info in someList
select new YourClassName
{
Property1 = info.Property1,
Property2 = info.Property2,
} into newInfo
select newInfo).AsEnumerable();
where YourClassName is the name of your class you want to initialize.And Property1, Property2 are properties inside the class.
Thursday, January 22, 2009
Object Initializer
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment