I'm trying to use a vb class in my C# project. I create a new vb project (with this vb class), compiled it and added a reference from the c# project to the vb project. When I'm trying to get into to vb class from C# class I can't find it. When I'm trying to "using" the Namespace I get Error. I can't reach this class no meter what!! any suggestions?
2 Answers
Is the class public? If not, you won't be able to see it from your C# project.
Check you've got the namespace right, noting that VB projects have a default namespace which is automatically prepended to whatever's in the source, IIRC. When in doubt, use something like Reflector or ILDASM to see what's in the assembly.
1 Comment
Jeff Paulsen
I agree - in my experience this is usually the project default namespace.
As you didn't post any code, I can only guess - is the class in the vb project marked as public?
1 Comment
Erez
Namespace CI_Gateway Public Class A #Region "API Declarations & Constants" <DllImport("kernel32.dll", CharSet:=CharSet.Auto, entrypoint:="CopyMemory")>