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

Why we use delegates in c#?

0 Answers  


can you overload a method of class A in Class B if it is derived class of A?If it is yes tell me how is it possible?

4 Answers   Mphasis, Ness Technologies,


What is executescalar in c#?

0 Answers  


What is the functionality of break and continue in Visual Studio?

2 Answers   JPMorgan Chase,


What are custom attributes in c#?

0 Answers  






What is msil, and why should developers need an appreciation of it if at all?

0 Answers  


What are the extension methods in c#?

0 Answers  


What are different properties provided by Object-oriented systems?

2 Answers  


I have to create a windows application using C# .net to Modifiy the XML file. The application have to show the node and node value. plz help me.

3 Answers   Merrill Lynch,


What is returned if you pass the value 12.34 to the parsefloat () function?

0 Answers  


What is the difference between these statements obj=null and obj.dispose()

4 Answers   Fulcrum Logic,


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

4 Answers   MMTS,


Categories