You cannot change the type at runtime. Expando may be an option, but I don’t understand how you want to interact with this object, since you would seem to be limited to reflection, and expando is not a huge reflection friend.
, IMO ( ) ; - Dictionary<string,object>, .
, , - partial , single, :
partial class Foo {
private string bar;
}
partial class Foo {
public string Bar { get {return bar;} set {bar = value;} }
}
TypeBuilder, .