|
INTERVIEW QUESTIONS
MICROSOFT
DOTNET
DETAILS
Question: What is an interface and what is an abstract class? Please, expand by examples of using both. Explain why.
Answer: Abstract classes are closely related to interfaces. They are classes that cannot be instantiated, and are frequently either partially implemented, or not at all implemented. One key difference between abstract classes and interfaces is that a class may implement an unlimited number of interfaces, but may inherit from only one abstract (or any other kind of) class. A class that is derived from an abstract class may still implement interfaces. Abstract classes are useful when creating components because they allow you specify an invariant level of functionality in some methods, but leave the implementation of other methods until a specific implementation of that class is needed. They also version well, because if additional functionality is needed in derived classes, it can be added to the base class without breaking code.
|
|
|
Category |
DotNet Interview Questions & Answers -
Exam Mode /
Learning Mode
|
Rating |
(0.2) By 9460 users |
Added on |
12/21/2010 |
Views |
70678 |
Rate it! |
|
|
Question:
What is an interface and what is an abstract class? Please, expand by examples of using both. Explain why.
Answer:
Abstract classes are closely related to interfaces. They are classes that cannot be instantiated, and are frequently either partially implemented, or not at all implemented. One key difference between abstract classes and interfaces is that a class may implement an unlimited number of interfaces, but may inherit from only one abstract (or any other kind of) class. A class that is derived from an abstract class may still implement interfaces. Abstract classes are useful when creating components because they allow you specify an invariant level of functionality in some methods, but leave the implementation of other methods until a specific implementation of that class is needed. They also version well, because if additional functionality is needed in derived classes, it can be added to the base class without breaking code. 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 |
|
How does output caching work in ASP.NET?
|
View Answer
|
|
What is an interface and what is an abstract class? Please, expand by examples of using both. Explain why.
|
View Answer
|
|
What is CLR?
|
View Answer
|
|
What is the use of ErrorProvider Control?
|
View Answer
|
|
What’s the difference between Response.Write() and Response.Output.Write()?
|
View Answer
|
|
What is the difference between user control an custom control? What are the advantages/disadvantages?
|
View Answer
|
|
Why The JavaScript Validation Not Run on the Asp.Net Button But Run SuccessFully On The HTML Button
|
View Answer
|
|
What is Response object? How is it related to ASP’s Response object?
|
View Answer
|
|
What are the advantages and drawbacks of using ADO.NET?
|
View Answer
|
|
Difference between Panel and GroupBox classes?
|
View Answer
|
|
Difference between Panel and GroupBox classes?
|
View Answer
|
|
What are the features of ADO.Net ?
|
View Answer
|
|
How many types of exception handlers are there in .NET?
|
View Answer
|
|
What are Assemblies.
|
View Answer
|
|
Name some of the languages .NET support?
|
View Answer
|
|
What is the base class of Button control?
|
View Answer
|
|
What are the differences between ASP and ASP .Net ?
|
View Answer
|
|
What is the Main difference between ASP and ASP.NET ?
|
View Answer
|
|
How does the XmlSerializer work? What ACL permissions does a process using it require
|
View Answer
|
|
What does this do? gacutil /l | find /i “about”
|
View Answer
|
Please Note: We keep on updating better answers to this site. In case you are looking for Jobs, Pls Click Here Vyoms.com - Best Freshers & Experienced Jobs Website.
View All DotNet Interview Questions & Answers - Exam Mode /
Learning Mode
|