Dynamics 365 CE/Power Platform, PowerApps, Power Automate, Azure by Vishal Grade
Someone asked me this question which is frequently asked in interviews i.e. why plugins implemented iplugin i.e. an interface and custom workflow inherit codeactivity i.e. an abstract class?
The purpose of question is to know why codeactivty is an abstract class and not an interface like iplugin?
So to understand the answer we fist need to understand the difference b/w interface and an abstract class:
What is an Abstract Class?
An abstract class is a special kind of class that cannot be instantiated. So the question is why we need a class that cannot be instantiated? An abstract class is only to be sub-classed (inherited from). In other words, it only allows other classes to inherit from it but cannot be instantiated. The advantage is that it enforces certain hierarchies for all the subclasses. In simple words, it is a kind of contract that forces all the subclasses to carry…
View original post 300 more words