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
Why do we need generics in c#?
How does one compare strings in c#?
What are the types of access modifiers?
What are the uses of namespaces?
What is thread pooling?
What is dynamic dispatch?
What is difference between Trace and Debug
What is the difference between asp net and c#?
Which program construct must return a value?
How to sort an int array in c#?
How do I format a string in c#?
If you define a user defined data type by using the class keyword, is it a value type or reference type?
What can I create with c#?
Which function is the entry point for a DLL in MS Windows 3.1?
Is a games console a computer?