■
Note
To display or hide interface names on the class designer, right-click on the interface icon and select
Collapse or Expand.
Invoking Interface Members at the Object Level
Now that you have a set of types that support the IPointy interface, the next question is how you
interact with the new functionality. The most straightforward way to interact with functionality
supplied by a given interface is to invoke the methods directly from the object level (provided the
interface members are not implemented explicitly; more details later in the section “Resolving
Name Clashes via Explicit Interface Implementation”). For example, consider the following Main()
method:
static void Main(string[] args)
{
Console.WriteLine("***** Fun with Interfaces *****\n");
Do'stlaringiz bilan baham: |