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

Explain the OOPS concept in C#?

0 Answers   HCL,


What is the difference between func and action delegate?

0 Answers  


What is a system lock?

1 Answers   AZTEC, Wipro,


What is regex c#?

0 Answers  


Can a class have more than 1 destructor?

0 Answers  






How are methods overloaded?

0 Answers  


What is an array class?

0 Answers  


Can hashtable have duplicate keys?

0 Answers  


When Should You Call The Garbage Collector In .net?

0 Answers   Siebel Systems,


What is a cs file?

0 Answers  


What is Asynchronous call and how it can be implemented using delegates?

0 Answers  


What is the difference between static class and singleton class in c#?

0 Answers  


Categories