G
Guest
This may be a trivial question, but it's stumping me.
public class A
{
}
public class B : A
{
B(A a)
{
// I want this class to reference 'a' and not copy it.
}
}
The idea is that you provide an instance of the base class 'A' and wrap
class 'B' around the same instance to provide extra functionality. I want to
specialise class 'A' into class 'B'. How do I do this?
Dave
public class A
{
}
public class B : A
{
B(A a)
{
// I want this class to reference 'a' and not copy it.
}
}
The idea is that you provide an instance of the base class 'A' and wrap
class 'B' around the same instance to provide extra functionality. I want to
specialise class 'A' into class 'B'. How do I do this?
Dave