Knowledge Check - Large Programs
1. True/False. A
using directive makes it so that you do not need to use fully qualified names.
True. They allow you to use simple names for types in the namespace identified by the
2. What namespace are each of the following types in? (a)
Console is in the
List<T> is in the
StringBuilder is in the
.NET 6 projects include have the equivalent of having a global
using directive for
System.Collections.Generic, so of the three, the only one you will usually need to add an explicit
using directive for would be
3. What keyword is used to declare a namespace?
namespace keyword is used to indicate the beginning of a namespace.
True/False. You should never write your own
Program class and
False. This is a matter of opinion, not a matter of correctness.
If you like writing out your own
Main, feel free to do so.
I, personally, like the newer style, where you don’t need to write those out yourself, but both work fine.