Quantcast
Channel: Questions in topic: "namespace"
Viewing all articles
Browse latest Browse all 398

Nested Namespaces

$
0
0
Just looking for a quick clarification here. I'm going through the scripting tutorials, and in the namespace lesson, it said that nested namespaces, such as System.Collections, implicitly included the higher-level namespace, as well. (At least, that's how I interpreted it. I may very well be wrong.) So, why do some of the other lessons bother including System.Collections.Generic, System.Collections, and System, instead of just using the most nested one? Wouldn't System.Collections.Generic imply the other two? Or have I misunderstood the way the namespace nesting works, and you always have to explicitly declare which namespace(s) you want, regardless of nesting? I imagine this is the case, since I don't see why people would declare both if my first assumption were correct, but I'd like to ask someone who has a better grasp of namespaces than I do. Thanks much!

Viewing all articles
Browse latest Browse all 398

Trending Articles