What is the difference between interface and abstract class ?

Answer Posted / chetan dubey

In c#.net there are basic differences:-
(1)In interface ,we cannot define an datafield while
datafield is declare in abstract class.
(2)Interface can be declared by using the keyword
interface,and abstract can declared by using the abstract
keyword.
(3)we can declare only function prototype which can be
define in inherited class but In abstract class,there is
minimum one abstract method and we define other method also.

Is This Answer Correct ?    1 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the purpose of namespace in c#?

530


Why we use get set property in c#?

572


How do I simulate optional parameters to com calls?

599


What is the difference between abstraction and encapsulation in c#?

573


What are the drawbacks of extending an interface as opposed to extending a class?

545






What is addressof operator?

612


What is a destructor in c#?

607


What is func delegate in c#?

611


What is using directive in c#?

615


What are some of the commonly used commands in sqlcommand?

577


What is a hashset c#?

550


What do u mean by delegation?

613


Define multicast delegate in c#?

591


What is windows forms in c#?

546


What is the difference between select and selectmany?

517