Posts Tagged Dynamic Classes

Dynamic Code/Class Generation (Update)

Back not to long ago, I released a post dealing with the dynamic generation of classes at run-time. Since then I have applied the concepts shown in that post in my real-world projects. As expected of any new code, I have found several bugs and inconveniences with the original code from that post. This time around I have an updated CodeGenerationHelper class, a DynamicFactory class, and an actual example of how to use the generated objects. The download-able version of the sample can be obtained through this link:

Read the rest of this entry »

, , , , , , ,


C# CodeGenerationHelper – Dynamic Classes – Create Class From Hashtable at Run-time

This post has been depreciated, for an updated version please visit:

Back a few months ago I had a class that needed (or so I thought) to be generated at run-time. The need arose from WPF controls only working with Properties, not fields, and more specifically ones that implemented INotifyPropertyChanged. (or dependency properties, but I typically save those for custom controls) After some research I created a simple straightforward helper class, CodeGenerationHelper, that would create a dynamic class at run-time from a hashtable. From a hashtable because my solution was working with data received through XML-RPC in the from of an extended hastable implementation. (XmlRpcStruct)

Read the rest of this entry »

, , , , ,