473,385 Members | 1,409 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

invisible classes outside the Class Library

buu
So, I have my class library that contains multiple classes, but I would like
to have only one of them to be visible outside the library...

how?
Jul 7 '08 #1
2 1095
Just change the access modifier on the classes you don't want exposed to
internal instead of public.

public class MyClass {
}

Would become:

internal class MyClass {
}

If you're using VB, it'd be Friend instead of internal.

"buu" wrote:
So, I have my class library that contains multiple classes, but I would like
to have only one of them to be visible outside the library...

how?
Jul 7 '08 #2
buu <ah*@a.comwrote:
So, I have my class library that contains multiple classes, but I would like
to have only one of them to be visible outside the library...

how?
Make the one you want to be visible public, and all the rest internal.

--
Jon Skeet - <sk***@pobox.com>
Web site: http://www.pobox.com/~skeet
Blog: http://www.msmvps.com/jon_skeet
C# in Depth: http://csharpindepth.com
Jul 7 '08 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Outshined | last post by:
I have a class library where just about every class uses its static initializer to register with a central registry object in the same assembly. I am hoping for some sort of Assembly.Load event...
8
by: Lars-Erik Aabech | last post by:
Hi! I've been looking around for an attribute that tells the intellitip thingy to skip some field or operation. Is there any? IE. a ListControl object has the DataSource property, but not all of...
18
by: Edward Diener | last post by:
Is the packing alignment of __nogc classes stored as part of the assembly ? I think it must as the compiler, when referencing the assembly, could not know how the original data is packed otherwise....
3
by: Robert Batt | last post by:
Hello, I'm trying to modularize the code in my forms by putting some procedures and delegates in a seperate class. However I try to put a delegate with the following header in a class. Public...
4
by: Chris F Clark | last post by:
Please excuse the length of this post, I am unfortunately long-winded, and don't know how to make my postings more brief. I have a C++ class library (and application generator, called Yacc++(r)...
2
by: Zytan | last post by:
I know that WebRequest.GetResponse can throw WebException from internet tutorials. However in the MSDN docs: http://msdn2.microsoft.com/en-us/library/system.net.webrequest.getresponse.aspx It...
7
by: Bruce | last post by:
I've been searching for some information on the use of Classes in ASP, but found very little information. I found this http://www.daniweb.com/tutorials/tutorial19997.html . Are there more...
8
by: puzzlecracker | last post by:
is there a way to create a library (assembly/dll) where I can only export few class? I don't want client to use or know about other internal classes in the assembly. Thanks
45
by: =?Utf-8?B?QmV0aA==?= | last post by:
Hello. I'm trying to find another way to share an instance of an object with other classes. I started by passing the instance to the other class's constructor, like this: Friend Class...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.