I have a code which looks like this :
Assembly assembly = Assembly.LoadFrom(\"ReflectionTest.dll\");
Type myType = assembly.GetType(@\"ReflectionTest.TestObject\
var listType = typeof(List<>).MakeGenericType(myType)
var list = Activator.CreateInstance(listType);
var addMethod = listType.GetMethod("Add");
addMethod.Invoke(list, new object[] { x });
You might be able to cast to IList and call Add directly instead of looking up the method with reflection:
var list = (IList)Activator.CreateInstance(listType);
list.Add(x);