[Mono-list] adding members to a class at runtime

Yves Glodt y.glodt at sitasoftware.lu
Mon Dec 19 14:59:28 EST 2005


Hi,

I need to port a homemade database abstraction layer to c#...
I use it in python and php and it simplifies my life a lot...

A problem I run into now is that I need to add members to a class at 
runtime...

e.g.:

class MyClass {
	public int var1;
	public int var2;
	public int var3;
}


E.g, now, at runtime, I need to add var4 that is a string and var5 that 
is another integer...

Can that be done in c# at all...?

thanks in advance and best regards,
Yves


More information about the Mono-list mailing list