Say I have a class that has a generics List as follows:
public List<MyClassmyC lassList = new List<MyClass>() ;
and I want to create another class which tries to add an element of MyClass
to that list, but it is not explicitly creating an instance of MyClass, but
instead using the Activator to create an instance based on it's type name.
How can I accomplish this in C# using reflection?
public List<MyClassmyC lassList = new List<MyClass>() ;
and I want to create another class which tries to add an element of MyClass
to that list, but it is not explicitly creating an instance of MyClass, but
instead using the Activator to create an instance based on it's type name.
How can I accomplish this in C# using reflection?
Comment