If a base class has a bunch of overloaded constructors, and
an inherited class has another bunch of overloaded
constructors, can you enforce a call from an inherited
constructor to an arbitrary base constructor?



If a base class has a bunch of overloaded constructors, and an inherited class has another bunch o..

Answer / js_m

yes, for example

class Root
{
public Root(int id) {...}
}

class Derived
{
public Derived (int id) : base(id)
{}
}

'public Derived (int id) : base(id)' does the need ful.

Is This Answer Correct ?    2 Yes 2 No

Post New Answer

More C Sharp Interview Questions

What?s the data provider name to connect to Access database?

6 Answers  


what is IComparable

1 Answers   Wipro,


What is default parameter in c#?

1 Answers  


Can you inherit multiple interfaces?

7 Answers   Host4Big, Mind Tree, Moftak Solutions, Siebel Systems,


What are different properties provided by Object-oriented systems?

2 Answers  


What is literal in c#?

1 Answers  


In which order the destructor is called for an inherited class?

1 Answers  


If multiple interfaces are inherited and they have conflicting method names; What will happen ?

1 Answers   Siebel,


Is c# difficult to learn?

1 Answers  


How to find whether the application is run from inside ide or not?

1 Answers  


Is datetime immutable c#?

1 Answers  


What is sqladapter c#?

1 Answers  


Categories