Answers

Question and Answer:

  Home  Microsoft.NET 2.0

⟩ What is interface and abstract class in .Net?

when a class is not provided with full functionalitythen it is declared as abstract.it doesn't support instance creation as well as it cannot be overridable to child class.interface is a colection of methods only without functionality.interface is 90% same as abstract class.

An interface class is a class contains all functions that are are abstract.

An abstract class is a class that may or may not contain an abstract function.

Abstract function : functions with only declaration , no definition is present. the user implimenting, inheriting the function has to override the function , mandatorily.

Instances of abstract class and interface class are made at runtime.so objects cannot be created ,due to lack of informations of the class.

 150 views

More Questions for you: