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 namespace
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?
It depends on how you're referencing your class library:
Try this:
namespace ClassLibrary1
{
namespace Internal
{
internal class InternalClass
{
public int internalStuff { get; set; }
}
}
namespace Public
{
public class PublicClass
{
public int publicStuff { get; set; }
}
}
}
If you reference this via a project reference, you'll see the empty namespace. If you reference a dll of it, you won't.