Interfaces enforce that all classes that implement them also implement the methods defined in the interface. This has all the traditional benefits associated with them, but in Dynamics 365 for Operations, we can go further.
We should create an interface called MyRunnableI with a method called Run() and a class that implements it called MyRunningPerson (which must have a method called Run()). We can assign an instance of MyRunningPerson to a variable of type MyRunnableI and call its Run() method. This allows greater flexibility and extensibility of our code.
However, in Dynamics 365 for Operations, we can create a plugin framework where the class to instantiate is configured in data. We can, therefore, control which class gets instantiated based on conditions only known at runtime.
In order to focus more on the way that we can use interfaces to create a plugin pattern...