internal is an assembly (strictly speaking, a module). This does not affect the visibility of the namespace.
The only way to achieve the confidentiality of a class from other classes within the same assembly is through a class that will be an inner class.
At this point, if the class is private, it is invisible to anything other than this class or the outermost class itself.
If the protection is protected, it is visible to everyone who can see it when it is private, but also visible to subclasses of the outer class.
public class Outer { private class Hidden { public Hidden() {} } protected class Shady { public Shady() {} } public class Promiscuous { public Promiscuous() {} } } public class Sub : Outer { public Sub():base() { var h = new Hidden();
In fact, the only way to achieve what you want is to use the outer class as a form of namespace and restrict yourself to this class.
ShuggyCoUk Aug 03 '09 at 18:40 2009-08-03 18:40
source share