using System.Collections.Generic;
public static void Main()
RunTest(new List<Object>{1, 2, 3, 4}, typeof (List<int>));
RunTest(new List<Object>{"1", "2", "3", "4"}, typeof (List<int>), performConversion: true);
public static void RunTest(List<object> objects, Type type, bool performConversion = false)
var convertedList = ConvertList(objects, type, performConversion);
Console.WriteLine(convertedList.GetType().Name);
Console.WriteLine(convertedList.GetType().GetGenericArguments().First().Name);
public static object ConvertList(List<object> items, Type type, bool performConversion = false)
var containedType = type.GenericTypeArguments.First();
var enumerableType = typeof (System.Linq.Enumerable);
var castMethod = enumerableType.GetMethod("Cast").MakeGenericMethod(containedType);
var toListMethod = enumerableType.GetMethod("ToList").MakeGenericMethod(containedType);
IEnumerable<object> itemsToCast;
itemsToCast = items.Select(item => Convert.ChangeType(item, containedType));
var castedItems = castMethod.Invoke(null, new[]{itemsToCast});
return toListMethod.Invoke(null, new[]{castedItems});