O'Reilly logo

C# Primer Plus by Klaus Michelsen

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 15

Answers to Chapter 15 Review Questions

1: What is the full name of the class defined inside these two namespaces?
namespace BliposSoft
{
    namespace RocketSimulation
    {
        class Rocket
        {
            ...
        }
    }
}
A1: BliposSoft.RocketSimulation.Rocket
2: A programmer in an uncontrolled moment of vanity gave the following name to a class:
ThisIsTheBestRocketClassInTheWholeWideWorldAndTheWholeWideBliposAsWell

The claim in the name is true, so you need to use this class extensively in your program, but you don't want to write the long name. How can this be avoided?

A2: You can create a shorter alias, such as Rocket for ThisIsTheBestRocketClassInTheWholeWideWorldAndTheWholeWideBliposAsWell with the following line:
 using Rocket = ThisIsTheBestRocketClassInTheWholeWideWorldAndTheWhole ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required