• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 345
  • Last Modified:

Creating Class Library in Visual C#

I am trying to following this sameple and using dll in my vb.net project, just for testing. I am using VS2008 3.5. I added it to Reference.

dim test as new Classlibrary1.class1 < this won't work.



C#
ee.jpg
0
VBdotnet2005
Asked:
VBdotnet2005
  • 2
2 Solutions
 
Paul JacksonCommented:
Looks like you've created a private class ensure you have the public keyword before the class i.e.

namespace ClassLibrary1
{
    public class class1
    {

     }
}

Open in new window

0
 
käµfm³d 👽Commented:
For correctness, the default (i.e. when you don't explicitly specify) access modifier for classes is internal, not private. You would not be able to see any internal members outside of the assembly containing that class--unless you include a special attribute.
0
 
Paul JacksonCommented:
@kaufmed thanks for the clarification, I wasn't aware of that I assumed it was private, but then I always specify access modifiers as a matter of course.

@vbdotnet2005

Here's some info on the differences between the access modifiers :

Access Modifiers
0
 
VBdotnet2005Author Commented:
excellent !!! Thank you
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now