Implementing and Accessing Interfaces
Implementing interfaces means telling a class that it needs to expose all members defined within the interface. This task is accomplished by using the
Implements keyword followed by the name of the interface. The following code snippet shows how to implement the
IDocument interface within a
You immediately notice that, when pressing Enter, the Visual Studio IDE automatically generate members’ templates for you. This is useful: You do not need to waste your time in writing members’ signatures. You also notice that when a member is defined within a class because of the interface implementation, ...