Why won\'t the following code work?
class parent {}
class kid:parent {}
List parents=new List;
It seems obvious t
If you know that the List contains List you can use an extension method to 'convert', (really just take the Parents that ARE of type child and return them in a list. eg something like:
public static List Convert(this List input) {
return input.OfType().ToList();
}
Im not sure if this helps you, but my 2 cents worth! I use it quite alot.