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?

Answer Posted / 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       View All Answers


Please Help Members By Posting Answers For Below Questions

What is a datacontract?

480


What is the object class in c#?

483


Explain the Different types of configuration files in .net?

569


What is class method c#?

481


explain the nature of the assembly work?

2097






How does a while loop work?

472


What is dll in c#?

504


What is the difference between ref and out parameters in c#?

457


What are handlers in c#?

496


Illustrate the process of code compilation in c#?

521


What is the diff between the System.Array.CopyTo() and System.Array.Clone()?

542


What are extensions methods in c#?

468


What is use of list in c#?

453


Define an assembly in .net?

517


Enlist all the components of an ado.net framework?

478