473,503 Members | 1,722 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Class not show outside of class library

Hi,
I'm building a class library and I use some classes in my library that I
would not like to expose when using the class library. I explain :

I use let's say Class1, Class2 and Class3. In Class1, I have an instance of
Class2 and in Class2 I have an instance of Class3. Class1 takes care of all
the operations done with class2 and class2 takes care of all the operations
done with class3.

So, I don't want Class2 and Class3 to show when a user will be using my
class lib

Is there a way to declare my classes in order for them not to show outside
of the class lib and still be able to use it within the class lib?

thanks

ThunderMusic
Nov 21 '05 #1
2 1165
doesn't declaring it as Friend allow that to happen?

Public Class Class1
Private Class2
End Class

Friend Class Class2

End Class

I didn't test it but I think that will work for you.
Chris

"ThunderMusic" <NO*******@sympatico.caSPAMATALL> wrote in message
news:OA****************@TK2MSFTNGP09.phx.gbl...
Hi,
I'm building a class library and I use some classes in my library that
I
would not like to expose when using the class library. I explain :

I use let's say Class1, Class2 and Class3. In Class1, I have an instance
of
Class2 and in Class2 I have an instance of Class3. Class1 takes care of
all
the operations done with class2 and class2 takes care of all the
operations
done with class3.

So, I don't want Class2 and Class3 to show when a user will be using my
class lib

Is there a way to declare my classes in order for them not to show outside
of the class lib and still be able to use it within the class lib?

thanks

ThunderMusic

Nov 21 '05 #2
"ThunderMusic" <NO*******@sympatico.caSPAMATALL> schrieb:
I use let's say Class1, Class2 and Class3. In Class1, I have an instance
of
Class2 and in Class2 I have an instance of Class3. Class1 takes care of
all
the operations done with class2 and class2 takes care of all the
operations
done with class3.

So, I don't want Class2 and Class3 to show when a user will be using my
class lib


You will have to change the class' accessibility modifier:

Visual Basic Language Concepts -- Accessibility
<URL:http://msdn.microsoft.com/library/en-us/vbcn7/html/vbconAccessibility.asp>

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>

Nov 21 '05 #3

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

Similar topics

6
1471
by: JSheble | last post by:
I come from a Delphi background, and am currently trying to port or convert some of our Delphi classes to C#. I've got a good handle on basic class design, but am a bit lost with some of the more...
14
1939
by: Lee Franke | last post by:
I can't seem to figure this one out. Here is my class structure namespace name { public class foo { } }
5
1945
by: Rob | last post by:
In many articles related to VB.net the word "class" is used... How many meanings are there to this word ? "possible to derived a class from another" "forms are full-fledged classes" "base...
5
2686
by: Cyril Gupta | last post by:
Hello, I have a class inside another class. The Scenario is like Car->Engine, where Car is a class with a set of properties and methods and Engine is another class inside it with its own set of...
4
1674
by: Tony Johansson | last post by:
Hello! I have one solution file that consist of three project. One project that build the exe file called A One project that build a user control dll. Here we have a class called B One project...
5
4908
by: muzilli | last post by:
Howdy all, I would like to know how can I insert a Timer object in my class library? This timer object will start and stop in a determinated part or event of my program. I know how to do...
3
3851
by: George | last post by:
Hi, I have searched on the net quite a bit, but the more I read, the more confused I get. I want to see if I can raise an event out side of the class. I believe this can be done in VB (at...
4
1313
by: Miro | last post by:
Vb2003, im still learning vb.net but I do not understand my output from this logic. If someone can help me out here. Cor Ligthert, you I believe were on the right track of what Im trying to...
3
1657
by: Med | last post by:
Hi, I use Visual C# Express 2005 and Visual Web Developer Express 2005. In my Visual C# Express 2005 Solution, I have following two class library projects: _ DataAccess (Namespace name:...
0
7086
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
1
6991
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7462
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5578
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5014
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...
0
4673
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3167
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
1
736
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
382
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.