public abstract class Request
{
public class Parameters
{
//Threre are no members here
//But there should be in inherited classes
}
public Request()
{
parameters = new Parameters();
}
public Parameters parameters;
}
Two questions:
-
How do I make it so I can add stuff to the constructor but the original constructor will still be executed?
-
How do I make it so the subclasses can add members to the Parameters class?
If you’re doing what I think you are you would have to change your constructor slightly:
and then you can do this:
What’s the specific problem that you’re trying to address? What you’re doing here seems fairly awkward and overly complicated.