I have an object taking a type parameter - call it Object<T> - and need to be able to add a number of objects with different type parameters to a list, as below:
var obj1 = new Object<SomeType>();
var obj2 = new Object<SomeOtherType>();
var list = new List<Object<WhatGoesHere>{ obj1, obj2 };
I know I could use an interface if it was just a list of different objects but that does not seem to apply to a list of objects with different type parameters so I am interested to know what my options are here?