Is it possible to cast a list of reflected Types to their original strongly typed objects?
问题 From the second line of the code below, I retrieve a List of Types. I would like to return this as a list of IBusinessObject. Is this possible? And if so, how would I go about doing this? public List<IBusinessObject> RetrieveAllBusinessObjects() { var businessObjectType= typeof(IBusinessObject); List<Type> implementationsOfBusinessObject = AppDomain.CurrentDomain.GetAssemblies() .SelectMany(s => s.GetTypes()) .Where(businessObjectType.IsAssignableFrom).ToList(); return ?; } 回答1: Here a