What is the differances between a abstract calss and
interface
Answers were Sorted based on User's Feedback
Answer / alb.shah
ABTRACT CLASS:
-------------
• It can not be instantiated
• It allow us to specify all access modifier except
Private
• A class inheriting this must implement all of its
abstract method
• A class can inherit only one abstract class at a
time.
• Abstract class can add more functionality with out
destroying child classes that were using old version.
• We can declare the following
1. Fields
2. Constructors
3. Static Constructors
4. Static Functions
5. Concrete Functions
INTERFACE :
---------
• It can not be instantiated
• It allows only public Access modifier
• A class implementing interface must provide body
for its entire member.
• A class can implement more than one interface at a
time.
• Adding of additional functionality will have an
effect on its child class due to the necessary
implementation of interface methods.
• We can not declare the following
1. Fields
2. Constructors
3. Static Constructors
4. Static Functions
5. Concrete Functions
Is This Answer Correct ? | 5 Yes | 0 No |
Answer / gyan
abstract class may contain concreate methods with abstract
methods where as interface containls only abstract methods
by default all methods in interface are public
where as abstract class can contain all modifiers except
private
abstract class involves in inheriting chain . where as
interfaces there is no need to follow inherit chain
Is This Answer Correct ? | 1 Yes | 0 No |
What is different between webconfig.xml & Machineconfig.xml ?
Which method is used to enforce garbage collection in .net?
What are the different types of caching ?
is it possible to use web site without web server from remote place?
1 Answers ABC, Mannar Company, Quadrant,
WHT IS DIFFERENCES BETWEEN HTML CONTROLS AND SERVER CONTROLS.
How many ways are there to maintain a state in .net? What is view state?
Is sql backend or frontend?
2. Why did you choose this career?
2 Answers Schwartz Oil, Swatz Oils,
Which method do you invoke on the DataAdapter control to load your generated dataset with data?
What is difference b/w Data Grid in ASP.Net 1.1 and Gridview in 2.0
Explain about asp.net 2.0 themes?
What does occur first in ASP.Net, Authentication or Authorization?