Let's create a project. The following is the default HTML we'll use:
Go to Solution Explorer, right-click on the name of the website, select Add, and then click on Class. Name the class PrintableObjects and click on OK. When the Visual Studio message comes up, click on Yes.
We really want to get the C# file more than anything else. With this in place, you can basically select all of the default code in the class and delete it. Refer to the following code:
public interface IPrintable
Here, public is accessible from anywhere, interface is a keyword, and IPrintable is its name. Many interfaces have "able" at the end, and the reason is that we think of the relationship between classes and interfaces as "can be used as." For example, a document is a printable thing. It can be used as a...