G
Guest
Hi,
I need to do the following.
In the constructor of the class MyClass I have an object already oMyClass. I
want to assign programmatically all that is assignable of the "new" myClass
to the corresponding of oMyClass.
Say:
this.Something1=oMyClass.Something1
this.Something2 =oMyClassSomething2
....
I tried to play around with MemberInfo and alike, and articles/examples I
found describe rather to get information about members/properties etc.
However, there was no example how I can do both at the same time... loop
through this.Somethings simultaneously with oMyClass.Somethings and assign
the contents of one to the other.
Can someone refer me to a good example (or even post one)?
Thanks,
I need to do the following.
In the constructor of the class MyClass I have an object already oMyClass. I
want to assign programmatically all that is assignable of the "new" myClass
to the corresponding of oMyClass.
Say:
this.Something1=oMyClass.Something1
this.Something2 =oMyClassSomething2
....
I tried to play around with MemberInfo and alike, and articles/examples I
found describe rather to get information about members/properties etc.
However, there was no example how I can do both at the same time... loop
through this.Somethings simultaneously with oMyClass.Somethings and assign
the contents of one to the other.
Can someone refer me to a good example (or even post one)?
Thanks,