Hello,
I use vs2005 and I'm a college student studying programming. I'm
currently enrolled in a visual basic programming class.
I have one question, and I apologize if it sounds dumb. What are
namespaces?
Thanks!
noosaj
They're useful for collecting and managing large amounts of related
code. An example would be a "MyGraphics" namespace. You would have
various classes, modules, and structures in the namespace, all related
to doing your Graphicsy stuff.
Namespaces can span across multiple files. To include something in
"MyGraphics", you just put the class/module between "Namespace
MyGraphics" and "End Namespace". If you had a class "MyCircle", you
could access it through "MyGraphics.MyCircle".
Namespaces aren't necessary, but some find them useful to organize
code better.
One more note, you can't have functions or variables declared standing
freely in a namespace. The only valid declarations in a Namespace (as
I know, but I could be wrong) are Clases, Modules, and Structures.