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
What is a datacontract?
What is the object class in c#?
Explain the Different types of configuration files in .net?
What is class method c#?
explain the nature of the assembly work?
How does a while loop work?
What is dll in c#?
What is the difference between ref and out parameters in c#?
What are handlers in c#?
Illustrate the process of code compilation in c#?
What is the diff between the System.Array.CopyTo() and System.Array.Clone()?
What are extensions methods in c#?
What is use of list in c#?
Define an assembly in .net?
Enlist all the components of an ado.net framework?