0
Easy, just use a function with a generic type parameter and a generic constraint:
void MyFunction<T>(Collection<T> listOfObjs) where T : ParentClass
{
// Process the list here
}
This will ensure that all objects in the list passed to MyFunction inherit from ParentClass, so they will all have the ID property.
Accepted 0
Thanks, Ill give this a try.