Try declaring Class D as Protected instead of Public.
http://www.startvbdotnet.c
This site has a listing of the access specifiers and what they do.
Main Topics
Browse All TopicsSo I have a Namespace setup like this
Namespace 1
Public Class A
...
End Class
Public Class B
...
End Class
Public Class C
...
End Class
Public Class D
...
End Class
End Namespace
What I would like to do is only expose A,B and C and Make D only accessable to classes within the namespace. I want to use D as a support class for A,B, and C but not allow it to be called directly.
Any help would be great. Thanks
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Try declaring Class D as Protected instead of Public.
http://www.startvbdotnet.c
This site has a listing of the access specifiers and what they do.
Business Accounts
Answer for Membership
by: eventprostrategiesPosted on 2005-07-07 at 09:53:16ID: 14389256
Hmm ... good question. Not entirely sure.
Not a final answer, but -- a workaround for the moment is to make the class private and stick it into each of the public classes. Obviously not a final answer -- I'll be interested to see if it's doable, how you want it -- but, you can always stick a private class into another class (as a helper class or whatnot -- just don't expose methods that require the class as a parameter or return type).
Non-public classes have to be within other classes ... and I don't know how Public Classes can be picky/choosy over who can call them.