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 inner class in c#?
What is difference between first and firstordefault?
Why do we parse in c#?
How to exclude a property from xml serialization?
What is serialization in unity?
What is the difference between system.text.stringbuilder and system.string?
Explain the difference between a sub and a function in c#.
Is there a way of specifying which block or loop to break out of when working with nested loops?
What is a boolean c#?
what is be the overhead, if i use binary transmission. and will it be sent using xml text or how ?
What is desktop GUI application?
Can a loop recorder detect a heart attack?
Which is executed if an exception has not occurred?
What is COM Interoperability?
What are partial types in c#?