I have a class :
class MyClass
{
}
...
MyClass c = new MyClass();
Is it possible to add properties / fields to this class on run-time ?
(I don't know what are their types or names on compile-time and they don't have a common interface which I can use.)
psuedo example :
Add property named "Prop1" [type System.Int32]
Add property named "Prop900" [type System.String]
I already read this question but it uses interface
Thanks in advance.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…