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 Web API?
What is the relationship(in oops) between codebehind and inline code(.aspx to .aspx.cs)??? explain
Will the asp.net validators run in server side or client side? How do you do client-side validation in .net? How to disable validator control by client side javascript?
what is clr . how we access them?
What are the different types of sessions in asp.net? Name them?
What are three ways that you can use a compare validator?
what is the challenging situation you faced in your career?
3 Answers Calsoft, HP, Satyam, Wipro,
Do ASP.NET forms authentication cookies provide any protection against replay attacks? Do they, for example, include the client's IP address or anything else that would distinguish the real client from an attacker?
What can we do with asp.net?
What is stateless asp or asp.net ?
2 Answers Accenture, BirlaSoft,
Does C# support static class?Is Static class be inherited by any class?
What is the difference between stored procedure vs function?
Visual Basic (800)
C Sharp (3816)
ASP.NET (3180)
VB.NET (461)
COM+ (79)
ADO.NET (717)
IIS (369)
MTS (11)
Crystal Reports (81)
BizTalk (89)
Dot Net (2435)
Exchange Server (362)
SharePoint (720)
WCF (340)
MS Office Microsoft (6963)
LINQ Language-Integrated Query (317)
WPF (371)
TypeScript (144)
Microsoft Related AllOther (311)