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

Explain partial class in c#?

671


How does inheritance work in c#?

821


What is private class in c#?

657


Is it possible to have different access modifiers on the get/set methods of a property?

693


Which are the access modifiers available in c#?

700


How do I calculate relative time?

688


What is the difference between // comments, /* */ comments and /// comments?

658


what is partial assembly reference

709


In which order the constructor is called for an inherited class?

718


Why are strings immutable c#?

635


What is stringwriter c#?

603


What does readonly mean in c#?

739


Which class does the remote object has to inherit?

809


What is boxing & unboxing?

762


What is Dependency of Injection?

700