Search code examples
c#namespacesusabilityclass-library

Keeping namespaces for internal classes from appearing in intellisense


I am writing a class library that contains classes with purely internal members. I have these divided into namespaces. There are no public or protected members in these internal classes.
The thing is, when I use this class library in a client application, these namespaces show up on intellisense. of course, they contain no accessable items, so it just ends, but I am worried that this may confuse users of the library
example:

    namespace mynamespace.yournamespace  
    {  
        internal class blah  
        {  
            internal void function1(){};  
            internal void function2(){};  
        }  
    }  

When used externally intellisense will show for: mynamespace.yournamespace but not offer any members (because theyre internal).
The question then, is, is there a way to prevent those internal classes from showing up in intellisense, or am I just worried about nothing? or.....if its internal, does it even need its own namespace?
Any help appreciated

(there is a similar post at: How can I prevent a public class that provides extension methods from appearing in Intellisense? that was inconclusive.)


Solution

  • No, I don't think there is a way.

    Based on the error

    Error 1 A namespace declaration cannot have modifiers or attributes

    I don't see how you could specify that a namespace should be hidden.

    The only (?) other way this might have been done is with include/exclude lists in the Intellisense settings but they're not there.