How different are interface and abstract class in .Net?

Answer Posted / vara prasad

In both Interface and Abstract classes we cannot create a
object but abstract classes can be inherited and we can
create a object for that derived class.

Abstract classes may contain concrete methods as well as an
Implementation of methods where as Interface doesn't
contain any implementation it just contains concrete
methods and to use those methods in interface we need to
inherit that interface and have to make sure that all
methods in the interface are implemented or else even the
derived class becomes an Interface.

Is This Answer Correct ?    26 Yes 6 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain the code behind wors and contrast that using the inline style.

569


What do the terms “boxing” and “unboxing” mean?

544


What are the core differences between .NET Languages ?

1799


Please explain what is the difference between encrypting a password and applying a hashing?

557


If I am writing in a language like vb or c++, what are the procedures to be followed to support .net?

599






What are code contracts?

606


Should I use readerwriterlock instead of monitor.enter/exit?

546


What are the different types of remote object creation mode in .net?

585


What is RPC? What is the use of it?

614


Explain what do the terms “boxing” and “unboxing” mean?

584


Explain what is a manifest in .net?

574


How many design patterns can be created in .net?

602


What is garbage collection and how it works. Provide a code example of how you can enforce garbage collection in .net?

522


Explain what is reflection in microsoft .net context?

567


What is "common language specification" (cls) in .net?

550