Solved

Creating Class Library in Visual C#

Posted on 2013-12-23
4
337 Views
Last Modified: 2014-01-06
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
Comment
Question by:VBdotnet2005
  • 2
4 Comments
 
LVL 29

Expert Comment

by:Paul Jackson
ID: 39737050
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
 
LVL 75

Assisted Solution

by:käµfm³d 👽
käµfm³d   👽 earned 250 total points
ID: 39737126
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
 
LVL 29

Accepted Solution

by:
Paul Jackson earned 250 total points
ID: 39737145
@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
 

Author Comment

by:VBdotnet2005
ID: 39760301
excellent !!! Thank you
0

Featured Post

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Could not load file or assembly 'Microsoft.Web.Infrastructure 4 33
ASP.NET (VB) return a record 2 40
Input parameteres to DragOver 2 20
Code enhancement 4 22
Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

821 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question