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

How Reflection is used and what it's significance ?

0 Answers   HCL,


What are properties and indexer?

3 Answers   TCS,


Which type of variables are under the control of garbage collector?

4 Answers   Kanbay,


If I want to override a method one of class A and in class b then how do you declare?

0 Answers  


What is a byte in c#?

0 Answers  






What is Web.config?

0 Answers   Amazon,


What are the different generaions of Garbage Collection and how do they work

4 Answers  


What are the benefits of using the aggregate method in linq?

0 Answers  


What?s the .NET datatype that allows the retrieval of data by a unique key?

2 Answers   SmartData,


How do you secure a webservice?

1 Answers   TCS,


What is difference between tostring() vs convert.tostring() vs (string) cast

0 Answers  


What is delegates and events?

0 Answers  


Categories