Not only can classes and types apply an extension method, but interfaces, collections, and any other objects can be functionally extended using an extension method as well. We are going to discuss this in the upcoming sections.
We can extend the method in an interface in the same way we extend the method in a class or type. We still need the
public static class and the
public static method. By extending the interface abilities, we can use the extension method just after we create it without the need to create the implementation inside the class that we inherit from the interface, since the implementation is done when we declare the extension method. Let's take a look at the ...