the code gets more interesting when you define an encapsulated instantiator like this:
internal T NewInstance<T>(params object args)
where T : class, ISomething1
var ttype = typeof(T);
ISomething1 instance = null;
instance = (T) Activator.CreateInstance(ttype, args);
return (T) instance;
}Which is, of course, only one way to handle instantiation; I tend to avoid 'Activator.CreateInstance for reasons I am sure you are aware of.
Returning to the "big picture:" what strategies do you use to increase the encapsulation of classes that maintain collections of mixed types ?
«The mind is not a vessel to be filled but a fire to be kindled» Plutarch