Results 1 to 3 of 3

Thread: Class and namespace question

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Feb 2003
    Location
    Argentina
    Posts
    1,950

    Class and namespace question

    I thought if a class, e.g. DataHelpers.vb, is in a project, the other files in the project don't need to actually import it to use it. But this doesn't seem to be the case. I do have to import it. Is this a namespace problem or is it correct behavior? Thanks.

  2. #2
    The Devil crptcblade's Avatar
    Join Date
    Aug 2000
    Location
    Quetzalshacatenango
    Posts
    9,091
    If they are all under the same namespace then there should be no need to import anything.

    If the class is under a different namespace, or a subnamespace, I believe you will need to import it, or use the fully qualified name.
    Laugh, and the world laughs with you. Cry, and you just water down your vodka.


    Take credit, not responsibility

  3. #3

    Thread Starter
    Frenzied Member
    Join Date
    Feb 2003
    Location
    Argentina
    Posts
    1,950
    Thanks crptcblade. The only namespace I find is the Root Namespace for the project. I did add the class to the project from another project, but it did the same thing there. Is this a difference between VS 2002 & 2003?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width