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 ...

Get C# Primer Plus now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.