Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. Problems with namespaces...

Problems with namespaces...

Scheduled Pinned Locked Moved Visual Basic
helpquestion
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    MrGlover
    wrote on last edited by
    #1

    I have a class in a Class Library project called "Foo". Here is the class... Namespace Foo Public Class Bar Shared Function HelloWorld() As String [...] End Class End Namespace I have compiled this and put the .dll Assembly into the \bin directory of a 2nd project. Project 2 is called HelloWorld2 and is a Windows Application which has a reference to the Foo.dll assembly added to it. Problem is the Import statement I need to use to access HelloWorld. I would have thought it would be Import Foo ... Public Class Form1 .... Private Sub Form1_Load(...) Handles MyBase.Load labal1.Text = Bar.HelloWorld() End Sub End Class End Sub But it seems I have to do Import Foo.Foo Why the extra Foo? Bah humbug!!

    K 1 Reply Last reply
    0
    • M MrGlover

      I have a class in a Class Library project called "Foo". Here is the class... Namespace Foo Public Class Bar Shared Function HelloWorld() As String [...] End Class End Namespace I have compiled this and put the .dll Assembly into the \bin directory of a 2nd project. Project 2 is called HelloWorld2 and is a Windows Application which has a reference to the Foo.dll assembly added to it. Problem is the Import statement I need to use to access HelloWorld. I would have thought it would be Import Foo ... Public Class Form1 .... Private Sub Form1_Load(...) Handles MyBase.Load labal1.Text = Bar.HelloWorld() End Sub End Class End Sub But it seems I have to do Import Foo.Foo Why the extra Foo? Bah humbug!!

      K Offline
      K Offline
      Kevin McFarlane
      wrote on last edited by
      #2

      I had the same problem recently. But I thought it may have been to do with the fact that I already had a namespace called Foo in an existing C# library. Kevin

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups