misterstick
Programmer
class a derives from class b. if i have an instance of class b, is there a quick way to construct an instance of class a, without hard-coding all the attributes?
mr s. <
Code:
public class B
{
public B() { }
// properties galore
private string p1; public string P1 { get; set; } //...
}
public class A : B
{
public A(B b)
{
// how do i get the properties of b into my
// new instance of a?
}
}
mr s. <