Namespace

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

The following is defined in VB .NET 2003
' VB .NET 2003
Namespace MyNamespace

Public Class MyClass

End Class

End Namespace

In my C# project, 'using MySpace' causes error that says the type of
namespace cannot be found.

I added reference to the C# project. Please help. Thanks.
 
er..um...

Well, clearly someplace you have a typo. You say "MyNamespace" in one
spot and "MySpace" in the other.

If the error is in your code, and not just in your message, problem
solved.
 
Solved.

In C#, type in the following

using MyVBProj.MyNamespace;
//MyVBProj is the VB .NET project name that contains the definition of class
//MyClass. In other words, you can eliminate namespace in your VB .NET
project //if you don't mean to create a namespace within the default one.

Thanks.
 
Back
Top