Basic namespace question

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Geoff Pennington

    Basic namespace question

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

    Much obliged,
    Geoff.


  • Jon Skeet [C# MVP]

    #2
    Re: Basic namespace question

    Geoff Pennington <GeoffPenn@veri zon.netNoSpam> wrote:[color=blue]
    > If I am using a class I haven't used before, how do I figure out what
    > namespace to import?[/color]

    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.Collecti ons,
    and in the assembly mscorlib.

    --
    Jon Skeet - <skeet@pobox.co m>
    Pobox has been discontinued as a separate service, and all existing customers moved to the Fastmail platform.

    If replying to the group, please do not mail me too

    Comment

    • Geoff Pennington

      #3
      Re: Basic namespace question

      Thanks. Sounds easy enough.

      "Jon Skeet [C# MVP]" <skeet@pobox.co m> wrote in message
      news:MPG.1bd8a2 6a5d9be3a898b6c e@msnews.micros oft.com...[color=blue]
      > Geoff Pennington <GeoffPenn@veri zon.netNoSpam> wrote:[color=green]
      > > If I am using a class I haven't used before, how do I figure out what
      > > namespace to import?[/color]
      >
      > 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.Collecti ons,
      > and in the assembly mscorlib.
      >
      > --
      > Jon Skeet - <skeet@pobox.co m>
      > http://www.pobox.com/~skeet
      > If replying to the group, please do not mail me too[/color]


      Comment

      Working...