Wednesday, December 7, 2011

cast an object enumeration to a list of a more specific type

public static List<Order> Whatever(IEnumerable<Object> objectEnumeration)

{

   return objectEnumeration.Cast<Order>().ToList();

}

No comments:

Post a Comment