H
hazz
The following classes follow from the base class ' A ' down to the derived class ' D ' at the bottom of the inheritance chain.
I am calling the class at the bottom, "public class D" from a client app with;
D m_D = new D(tkn);
public class A : MarshalByRefObject
public A () <---------------------
public class B : A
public B () <----------------------
public B (Token tkn) : this()
{
CODE I WANT TO EXECUTE BASED ON THE VALUE OF THE TOKEN THAT WAS PASSED IN WHEN D BELOW WAS INSTANTIATED.
THROW AN EXCEPTION IF VALUE OF THE TOKEN IS eg. > 0
}
public class C : B
public C () <---------------------
public C (Token tkn) : base(tkn)
public class D: C , Interface_D
public D()
public D (Token tkn) <----------------------
I inherited this design and don't know what the base(tkn) and this() are doing? (ie. i am clueless)
What I want to happen is for the callee to begin at the bottom of the inheritance chain and call only the constructors
that have the 'Token' signature. I want this process of walking up the inheritance chain to stop once it finds the ctor at
public Class B with the Token signature.
Right now the execution path moves correctly into the lowermost class with the ctor that contains the Token method signature.
After that it jumps right up through the null constructors and never visits any of the ctors with the (Token tkn) signature.
How do I achieve this ability for the method call to get passed up the ctor chain visiting only the ctors with the Token method
and stopping at Class B before its retreat back down the stack?
Thank you... -greg
I am calling the class at the bottom, "public class D" from a client app with;
D m_D = new D(tkn);
public class A : MarshalByRefObject
public A () <---------------------
public class B : A
public B () <----------------------
public B (Token tkn) : this()
{
CODE I WANT TO EXECUTE BASED ON THE VALUE OF THE TOKEN THAT WAS PASSED IN WHEN D BELOW WAS INSTANTIATED.
THROW AN EXCEPTION IF VALUE OF THE TOKEN IS eg. > 0
}
public class C : B
public C () <---------------------
public C (Token tkn) : base(tkn)
public class D: C , Interface_D
public D()
public D (Token tkn) <----------------------
I inherited this design and don't know what the base(tkn) and this() are doing? (ie. i am clueless)
What I want to happen is for the callee to begin at the bottom of the inheritance chain and call only the constructors
that have the 'Token' signature. I want this process of walking up the inheritance chain to stop once it finds the ctor at
public Class B with the Token signature.
Right now the execution path moves correctly into the lowermost class with the ctor that contains the Token method signature.
After that it jumps right up through the null constructors and never visits any of the ctors with the (Token tkn) signature.
How do I achieve this ability for the method call to get passed up the ctor chain visiting only the ctors with the Token method
and stopping at Class B before its retreat back down the stack?
Thank you... -greg