Defining Custom Interfaces
Now that you better understand the overall role of interface types, let’s see an example of defining
custom interfaces. To begin, create a brand-new Console Application named CustomInterface.
Using the Project ➤ Add Existing Item menu option, insert the files containing your shape type defi-
nitions (MyShapes.cs and Shape.cs in the book’s solution code) created back in Chapter 6 during the
Shapes example. Once you have done so, rename the namespace that defines your shape-centric
types to CustomInterface (simply to avoid having to import namespace definitions within your new
project):
namespace CustomInterface
{
Do'stlaringiz bilan baham: |