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
Is for loop faster than foreach?
State two different types of access modifiers.
What is a decimal in c#?
What is ispostback c#?
What is difference between function and method in c#?
What are synchronous and asynchronous operations?
What is a partial class. Give an example?
Are arrays immutable c#?
what is collections in .net? why we use?
How do I stop my console from closing in c#?
What do you mean by the delegate in c#?
What are circular references? How garbage collection deals with circular references.
Is c# a keyword?
What is datatable in c#?
Explain streamreader/streamwriter class?