Chapter 4
Answers to Chapter 4 Review Questions
1: | What are namespaces used for in C# and .NET? |
A1: | Namespaces act as containers for classes. They help us organize the classes of our programs and to provide easy access to them (when reused) by outside parties. |
2: | What is the advantage of including the keyword using followed by the name of a namespace in the beginning of a program? |
A2: | It allows us to write short names instead of long, fully-qualified names when we refer to classes in a namespace. This makes it easier to type the names and improves the readability of the source code. |
3: | Which namespace contains classes related to mathematical calculations and console input/output. |
A3: | The System namespace. |
4: | How should comments be applied in the source ... |
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.