D
DBC User
I have 2 classes which are exactly same except the name. I do not have
access to either of the class to change anything in it.
In my code, I need to copy one of one class to another class. How can I
do this?
class A
{
....
}
class B
{
.....Exactly same as A, all properties and methods
}
class C
{
A a;
B b;
b = (B)a; // trying to do this but fails with invalid casting.
}
Any help?
Thanks,
access to either of the class to change anything in it.
In my code, I need to copy one of one class to another class. How can I
do this?
class A
{
....
}
class B
{
.....Exactly same as A, all properties and methods
}
class C
{
A a;
B b;
b = (B)a; // trying to do this but fails with invalid casting.
}
Any help?
Thanks,
