views:

414

answers:

1

I have a class library that has a couple of namespaces containing only internal types.

However, when using the class library in an application project, the namespaces shows up in intellisense, but of course they are empty. Is there any way for me to hide the namespaces completely when using intellisense in other projects?

I've tried to apply EditorBrowsableAttribute to all the internal classes as well, but what I'd like to do would be to apply that to the namespace, which is of course impossible.

Or is, if I care enough about this, the only option I have to just move the types into a namespace that contains public types?

+2  A: 

I've come up against this before and found no solution, only a workaround which may or may not work in your project. Instead of defining a namespace you could use an nested static class?

James L
Yeah, I could do that, but then I'd need to rewire all references, as nested classes will need to be part of the qualifying name all over the place. ie. I'd need to write this: var x = new NotReallyANamespace.ClassName(); instead of just adding the using directive. +1 for idea though :)
Lasse V. Karlsen
I know, it's a long way from perfect :(
James L