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
Can I fly with a loop recorder?
What is an escape sequence in c#?
How long has c# been around?
Can you inherit from a sealed class?
What is asp net c# corner?
What is eager and lazy loading in c#?
What is asax file in c#?
Can a abstract class have a constructor?
What is the C# syntax to catch any possible exception?
What is the xml document structure?
Is and as in c#?
What is difference between struct and class in c#?
Explain nullable types in c#?
Explain About DTS package
Why would you use a class property in c#?