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

Question about Namespaces and the Object Browser.

P: n/a
I can't seem to make sense out of the Object Browser in VB.NET.

Here's one example. I often use the the Sleep method found in the
Thread object like this:

Imports System.Threading

Private Sub test
Thread.Sleep(1000)
End test

When I look in the Object Browser under System I find System.Threading.
Nowhere do I find the Thread object. Where is it? I can't find it
anywhere in the Object Browser.

Another question. The top level of the Object Browser looks something
like this:

System
System.Data
System.Drawing

Why wouldn't Data be found UNDER the System namespace instead of
BESIDES it?

Also when you look at the System namespace you find something like
this:

System
Microsoft
Microsoft.CSharp
System
System.Threading

Shouldn't my Import statement be this:

Imports System.System.Threading?

Is the Object Browser hierarchical or just random?

I'm so confused!!!!!

Nov 21 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
<cr***@hotmail.com> schrieb:
I can't seem to make sense out of the Object Browser in VB.NET.

Here's one example. I often use the the Sleep method found in the
Thread object like this:

Imports System.Threading

Private Sub test
Thread.Sleep(1000)
End test

When I look in the Object Browser under System I find System.Threading.
Nowhere do I find the Thread object. Where is it? I can't find it
anywhere in the Object Browser.

Another question. The top level of the Object Browser looks something
like this:

System
System.Data
System.Drawing

Why wouldn't Data be found UNDER the System namespace instead of
BESIDES it?

Also when you look at the System namespace you find something like
this:

System
Microsoft
Microsoft.CSharp
System
System.Threading

Shouldn't my Import statement be this:

Imports System.System.Threading?

Is the Object Browser hierarchical or just random?


The names in the first row are assembly names, not namespace names. Notice
that namespaces are not necessarily available in a single assembly,
different types residing in different assemblies can be part of the same
namespace.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

Nov 21 '05 #2

P: n/a
cr***@hotmail.com wrote:
When I look in the Object Browser under System I find
System.Threading. Nowhere do I find the Thread object. Where is it? I
can't find it anywhere in the Object Browser.


If you press Ctrl+Shift+Alt+F12 (phew!), it will open the 'Find Symbol'
window. In here, type 'Thread' in the 'Find What' box and then click 'Find'.

All the matching symbols will appear in the panel at the bottom. If you
scroll down you'll see 'Thread (System.Threading)' in the list. Double-click
it and it'll take you to the class within the object browser. (It's actually
under mscorlib/Namespaces/System.Threading/Classes).

Hope that helps,

--

(O)enone
Nov 21 '05 #3

P: n/a

Oenone wrote:
cr***@hotmail.com wrote:
When I look in the Object Browser under System I find
System.Threading. Nowhere do I find the Thread object. Where is it? I can't find it anywhere in the Object Browser.
If you press Ctrl+Shift+Alt+F12 (phew!), it will open the 'Find

Symbol' window. In here, type 'Thread' in the 'Find What' box and then click 'Find'.
All the matching symbols will appear in the panel at the bottom. If you scroll down you'll see 'Thread (System.Threading)' in the list. Double-click it and it'll take you to the class within the object browser. (It's actually under mscorlib/Namespaces/System.Threading/Classes).


Got it.

Thanks!

Nov 21 '05 #4

P: n/a
Herfried K. Wagner [MVP] wrote:

Is the Object Browser hierarchical or just random?
The names in the first row are assembly names, not namespace names.

Notice that namespaces are not necessarily available in a single assembly,
different types residing in different assemblies can be part of the same namespace.


OK that makes a bit more sense.

It still seems odd to me that the following 2 Namespaces are totally
different:

mscorlib Assembly
System.Threading Namespace

System Assembly
System.Threading Namespace

It would seem that my Imports statement should say this:

Imports mscorlib Assembly - System.Threading

Instead of this:

Imports System.Threading

Nov 21 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.