How can I use reflection to create a generic List with a custom class (List<CustomClass>)? I need to be able to add values and use
propertyInfo.SetValue(..., ..., ...)
to store it. Would I be better off storing these List<> s as some other data structure?
编辑:
我应该指明对象更像这样,但马克·格拉维尔的答案仍然有效。
class Foo
{
public List<string> Bar { get; set; }
}