What I have is a collection of classes that all implement the same interface but can be pretty wildly different under the hood. I want to have a config file control which of the classes go into the collection upon starting the program, taking something that looks like
<class1 prop1="foo" prop2="bar"/>
and turning that into
blah = new class1();
blah.prop1="foo";
blah.prop2="bar";
in a very generic way. The thing I don't know how to do is take the string "prop1" in the config file and turn that into the actual property accessor in the code. Are there any metaprogramming facilities in C# to allow that?