|
INTERVIEW QUESTIONS
MICROSOFT
C#
DETAILS
Question: What if a base class has a bunch of overloaded constructors?
Answer: 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?
Yes, just place a colon, and then keyword base (parameter list to invoke the appropriate constructor) in the overloaded constructor definition inside the inherited class.
|
|
|
Category |
C# Interview Questions & Answers -
Exam Mode /
Learning Mode
|
Rating |
(0.3) By 6568 users |
Added on |
9/22/2014 |
Views |
66885 |
Rate it! |
|
|
Question:
What if a base class has a bunch of overloaded constructors?
Answer:
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?
Yes, just place a colon, and then keyword base (parameter list to invoke the appropriate constructor) in the overloaded constructor definition inside the inherited class. Source: CoolInterview.com
If you have the better answer, then send it to us. We will display your answer after the approval.
Rules to Post Answers in CoolInterview.com:-
- There should not be any Spelling Mistakes.
- There should not be any Gramatical Errors.
- Answers must not contain any bad words.
- Answers should not be the repeat of same answer, already approved.
- Answer should be complete in itself.
|
|
Related Questions |
View Answer |
|
Can you prevent your class from being inherited and becoming a base class for some other classes?
|
View Answer
|
|
Is there an equivalent of exit() for quitting a C# .NET application?
|
View Answer
|
|
What is delay signing?
|
View Answer
|
|
Can you have two files with the same file name in GAC?
|
View Answer
|
|
How can you debug failed assembly binds?
|
View Answer
|
|
How can you tell the application to look for assemblies at the locations other than its own install?
|
View Answer
|
|
What is a strong name in C#?
|
View Answer
|
|
What is the difference between private and shared assembly?
|
View Answer
|
|
How do you mark a method obsolete?
|
View Answer
|
|
If I return out of a try/finally in C#, does the code in the finally-clause run?
|
View Answer
|
|
If I return out of a try/finally in C#, does the code in the finally-clause run?
|
View Answer
|
|
Is it possible to have a static indexer in C#?
|
View Answer
|
|
Is it possible to have different access modifiers on the get/set methods of a property in C#?
|
View Answer
|
|
Is it possible to inline assembly or IL in C# code?
|
View Answer
|
|
What are the rules to be followed while naming variables in C#?
|
View Answer
|
|
Explain about the rules for naming classes in C#?
|
View Answer
|
|
Explain about C#?
|
View Answer
|
|
C# constructors cannot be inherited.Why?
|
View Answer
|
|
Why we can not do the declaration in the class?
|
View Answer
|
|
What is delegates ?
|
View Answer
|