I have a method on an object oriented database that creates tables based on their type.
I want to be able to send a list of types to get created, but i'm hoping to limit them to only classes derived from a specific base class (MyBase).
Is there a way i can require this in the method signature? Instead of
CreateTables(IList<Type> tables)
Can i do something that would
CreateTables(IList<TypeWithBaseTypeMyBase> tables)
I know i could check the base class of each type sent over, but if possible i'd like this verified at compile time.
Any suggestions?