I have a set up like this:
abstract class Foo {} class Bar : Foo {}
and a method elsewhere of this form:
void AddEntries(List&l
You could make your AddEntries generic and change it to this
AddEntries
void AddEntries(List test) where T : Foo { //your logic }
Have a look at Constraints on Type Parameters for further information.