What?s the difference between an interface and abstract class?

Answer Posted / nikhil

Difference

1. Interface doesn't allow accessibility modifier where as
we can specify accessibility modifier (public, private,
protected) for an abstract class.

2. Interface doesn't provide the implementation of the
members declared. This is not the case with abstract class

3. A class can inherit one and only one abstract class,
where as a class can implement one or more interfaces

Is This Answer Correct ?    10 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Is c# 8 released?

496


What are custom attributes in c#?

499


What is executescalar in c#?

462


Value Type and Reference Type Data type in C#?

553


What is an assembly qualified name? Is it a filename? How is it different?

498






Why do we use virtual methods in c#?

488


What are the advantages of using assemble language programming?

523


What is the use of console?

491


what is the difference between the debug class and trace class?

522


What is the ouput of the following program?

567


What is the use of tryparse in c#?

466


If dll and exe files are same it means you can deploy both the files in gac?

495


What is the main purpose of linq?

481


Does constructor return any value in c#?

503


What do you mean by synchronous and asynchronous operations?

477