runtime creation of classes?

By kush.sharma ·
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.

Thread display: Collapse - | Expand +

All Answers

Collapse -


by Tony Hopkinson In reply to runtime creation of class ...

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.


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.


Related Discussions

Related Forums