Refactoring – Extract Interface

Refactoring is a disciplined technique of restructuring your existing body of code by altering its internal structure without changing its external behavior. Extract Interface defines a new interface type based on a set of existing type members.

Interfaces define a set of abstract members (properties, methods, and events) that a given type may support. The implementing type will fill in the specifics. Since types in completely different hierarchies can implement the same interface, interfaces allow us to obtain polymorphism across hierarchies, namespaces, assemblies, and .NET programming languages.

The Extract Interface refactoring dialog in Visual Studio Team System.