// Make use of types defined the MyShape namespace.
using System;
using MyShapes;
namespace MyApp
{
class ShapeTester
{
static void Main(string[] args)
{
Hexagon h = new Hexagon();
Circle c = new Circle();
Square s = new Square();
}
}
}
A Type’s Fully Qualified Name
Technically speaking, you are not required to make use of the C# using keyword when declaring a
type defined in an external namespace. You could make use of the fully qualified name of the type,
which as you recall from Chapter 1 is the type’s name prefixed with the defining namespace:
C H A P T E R 1 5
■
I N T R O D U C I N G . N E T A S S E M B L I E S
476
8849CH15.qxd 10/22/07 1:46 PM Page 476
Do'stlaringiz bilan baham: |