Wednesday, March 2, 2016

What is the difference between abstract class and interface in c#?

Abstract class


  • Abstract class not not support multiple inheritance
  • It contains constructor
  • An abstract class contains access modifier
  • Fast execution to find the actual method in the class
  • in abstract class fields and constraints have defined
  • An abstract class provides the complete code 
  •  Member of the abstract class can be static  
 Interface 


  • Interface support multiple inheritance
  • It does not contain constructor
  • an interface not not have any access modifier
  • Take more time to find the actual method in the class
  • fields can not be defined in the interface
  • An interface can not provide any code rather then the signature
  • member of the static class can not be static

2 comments:

  1. dot net is the latest technology also provides many features and also easy to learn.you blog also provide descriptive information thank you for sharing dotnet-sai.blogspot.in

    ReplyDelete
    Replies
    1. its ok...Thank you for giving valuable feedback

      Delete