In asp.net, what is the concept of the Namespace?
I mean, I am looking at a Custom MembershipUser, at the top it has a Namespace of say, MyNameSpace....
within this MembershipUser, it implements a custom ObjectBase class, which also has the namespace MyNameSpace.
Then in this example I'm looking at, there are a couple of other custom classes and they have a namespace of, for example:
MyNameSpace.Stuff
Why do you create this "Stuff" sub namespace? What is that called anyway? and why?
I have read this:
http://msdn2.microsoft.com/en-us/library/0dx91cw5(VS.80).aspx
So please don't send me to a URL.
For instance.. it says:
>>causes the source code following the declaration to be compiled within that namespace
So what are the benefits of compiling into a namespace?
Just a one paragraph explanation explaining why you use it, the benefits, etc. Not looking for a book, just something you'd explain to a trainee at the coffee pot about namespaces in human language.
Now, in the above url, it says this:
>>Adding to a Namespace. If a namespace is already defined, even outside your project, you can add programming elements to it. To do this, you use a Namespace statement to direct Visual Basic to compile the following elements into that namespace.
It shows an example of using this namespace:
Namespace System.Collections.Generic
But that is an existing namespace. Why would you add to an existing System namespace?
>>Why do you create this "Stuff" sub namespace? What is that called anyway? and why?
>>So what are the benefits of compiling into a namespace?
In my opinion, in practice, namespaces are just housekeeping.
How do you want to group and organize your code?
Usage of namespaces (again, just in my experience) is going to be defined either by company standards or the developer.
>>Why would you add to an existing System namespace?
Again, just housekeeping.
If you write some code that manipulates text, do you want it in your own namespace and class and use it with something like "MyNamespace.MyTextFunctio
or do you feel it's good enough to be part of System.Text?
and then call it with "System.Text.MyTextFunctio