I want to externalize the definition of classes to a xml fle and parse that file to get the declarative information about classes and use reflectionto create the classes and I should also be able to invoke them at runtime. can I separate the creation of classes from the invocation of the methods.
This conversation is currently closed to new comments.
Is there some reason why you aren't using serialization?
I do this sort of thing with extension methods.
put all the calsses and their 'nornal functionality in one assembly. Craete another assembly add a static classv for each one you want to load (same name is convenient) with a load method that extends the class to be loaded.
e.g.
internal static class SomeClass { public static SomeClass Load(this Some.Other.NameSpace.SomeClass argTarget, String argXmlSnippet) { } }
this in loader dll would instantiate some class from someother dll, and fill it in from the xml.
If you're asking for technical help, please be sure to include all your system info, including operating system, model number, and any other specifics related to the problem. Also please exercise your best judgment when posting in the forums--revealing personal information such as your e-mail address, telephone number, and address is not recommended.
runtime creation of classes?