I have a set of user controls that are defined like this.
public class Control1: UserControl, Shop.Stock.IBlue public class Control2: UserControl, Shop.Stock.IBlue public class Control2: UserControl, Shop.Stock.IBlue
Note that there are about 200 of them, and they are named better in a real project.
I want to write an extension method for objects based on UserControl and implement the Shop.Stock.IBlue interface
I do not want the extension method to simply consist of UserControl
Is there a way to do this without adding to a new base class?
source share