By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,635 Members | 1,703 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,635 IT Pros & Developers. It's quick & easy.

.NET Namespaces

P: n/a
The .NET namespace organization confuses me. I opened a new VB.NET
Windows Application and headed for the object browser. It had things
such as:

(1) mscorlib
(2) Microsoft.VisualBasic
(3) System
(4) System.Data
(5) System.Drawing
(6) System.Windows.Forms
(7) System.Xml
(8) WindowsApplication1

While I know the entries (2) through (7) are .NET namespaces, what is
the first entry mscorlib (I understand it is a deformation of
Microsoft Core Library but what exactly is it - a namespace)?

Further, I opened the mscorlib node in the treeview to see other
namespaces, some of which are:

(1) Microsoft
(2) Microsoft.Win32
(3) System

Opening the node System from within the mscorlib node showed me the
classes within the System namespace.

However, opening the System node that is a sibling (and not the child)
to the mscorlib class does not show the contained classes.

Why do they have the same namespace, System, twice - once as a child
to mscorlib and once as a sibling?

And when System.Data is a reference to the Data namespace contained
within the System namespace, would not setting a reference to just the
System namespace take care of all contained namespaces including
System.Data? Why do they have to seperately declare:

-System
-System.Data
-System.Drawing
Nov 20 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
* te***********@yahoo.com (Techno Learner) scripsit:
The .NET namespace organization confuses me. I opened a new VB.NET
Windows Application and headed for the object browser. It had things
such as:

(1) mscorlib
(2) Microsoft.VisualBasic
(3) System
(4) System.Data
(5) System.Drawing
(6) System.Windows.Forms
(7) System.Xml
(8) WindowsApplication1

While I know the entries (2) through (7) are .NET namespaces, what is
the first entry mscorlib (I understand it is a deformation of
Microsoft Core Library but what exactly is it - a namespace)?
No, that are /not/ namespaces, but assembly names. Namespaces are
marked with a "{}" icon in the object browser. The namespaces contained
in an assembly are shown when opening the assembly's branch in object
browser.
Further, I opened the mscorlib node in the treeview to see other
namespaces, some of which are:

(1) Microsoft
(2) Microsoft.Win32
(3) System

Opening the node System from within the mscorlib node showed me the
classes within the System namespace.

However, opening the System node that is a sibling (and not the child)
to the mscorlib class does not show the contained classes.


That's another assembly.

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>
Nov 20 '05 #2

P: n/a
Thanks for the reply. That settles it. They're assemblies and not
namespaces. Eureka!
Nov 20 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.