Basic namespace question

  • Thread starter Thread starter Geoff Pennington
  • Start date Start date
G

Geoff Pennington

If I am using a class I haven't used before, how do I figure out what
namespace to import?

Much obliged,
Geoff.
 
Geoff Pennington said:
If I am using a class I haven't used before, how do I figure out what
namespace to import?

By at the documentation for the type. For instance, if you want to use
Hashtable, look up "about Hashtable" in MSDN, and go to the bottom of
the page. It tells you that it's in the namespace System.Collections,
and in the assembly mscorlib.
 
Thanks. Sounds easy enough.

Jon Skeet said:
By at the documentation for the type. For instance, if you want to use
Hashtable, look up "about Hashtable" in MSDN, and go to the bottom of
the page. It tells you that it's in the namespace System.Collections,
and in the assembly mscorlib.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top