Please help, I have a method that returns an Object. This returned object could be a generic list of 4 or more classes in my code. i.e the object could be List<class1>, List<class2>, List<class3> etc. At runtime when I recieve this object, I want to be able to cast it to a list of the appropriate type. PS. The methods return value is object. The writers of this class that I'm calling basically create a generic list and fill it up, then for reason i cant explain, they cast the list to an object and return is. The return line is exactly ==> return (object)thegeneicList How do I go about creating a generic list List<T> where T is only known at runtime
| |