My current understanding of dynamically generated types is this:
If you generate a type via CodeDom and load it into an AppDomain, there is no way to unload that type (i.e. Assembly.Unload(...)
doesn't exists) without destroying the AppDomain as a whole.
Are there any other ideas on how to create custom types at runtime?
Can the C# 4.0 dynamic
keyword be used somehow magically? Could the .NET 4 ExpandoObject
be utilised is some lovely way?
Could anonymous types and the dynamic keyword be combined with some technical wizardry?! It feels like we have the tools scattered that might achieve something useful. But I could be wrong.