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

Is there any sample c# code for simple threading?

0 Answers  


How does split work in c#?

0 Answers  


What statements can enclose a "continue" statement?

3 Answers   Fortech,


What is the purpose of static?

0 Answers  


What operators can be used to cast from one reference type to another without the risk of throwing an exception?

0 Answers  






what is difference between is and as operators in c#?

0 Answers   Winsol Solutions,


What is action c#?

0 Answers  


What is xml serializer?

0 Answers  


Explain what is the smallest unit of execution in .net?

0 Answers  


What are the characteristics of c#?

0 Answers  


Can you see a loop recorder?

0 Answers  


What are the types of operator?

0 Answers  


Categories