What is difference between Abstract Class and Interface?

Answer Posted / tarunkumar

Abstract class is a class in which it will contain both the
abstract and non-abstract methods.The abstract class must
be inheritable by another class. In vb.net it will be
defined using mustinheritable keyword.
The syntax is :
Public MustInheritable Class classname

Interface is a class in which it will contain only the
abstract methods. The interface can be implemented or not
by the another class.The functions in interface will be
implemented by the another class which implements the
interface.
The syntax is :
Public Interface interfacename

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain about garbage collection?

589


What is writeline in vb.net?

533


Explain global assembly cache (gac)?

737


What is a literal control?

585


Tell me how many .net languages can a single .net dll contain?

533






What is the role of new keyword?

643


what is the advantage of option strict on?

618


Explain about the feature anonymous type?

625


Explain the difference between int and int32?

533


How can we store decimal data in .net?

556


What is econo-jit?

625


Which is the base class for all the classes in .net framework?

571


Can you please explain the difference between value and reference types?

535


How many ways the function can return values?

543


Can you please explain the difference between int and int32?

576