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.
 
Back
Top