I am currently writing a DLL file, which uses some inheritances. Now I am having trouble with exposing my classes, because all the base classes are exposed too.
For instance:
public Class TestBase // Base class that gets exposed
{
}
public Class TestFunctions : TestBase // The class that I want to expose gets exposed
{
}
Problem of internal or other modifiers (like protected):
internal Class TestBase // Base class that won't get exposed
{
}
internal Class TestFunctions : TestBase // The class that I want to expose won't get exposed either
{
}
I want to expose TestFunctions
to the user of the DLL file, but I dont want to expose the TestBase
, because the base class is only used internally. Exposing the base class is redundant for the user of the DLL, since all that he needs is contained inside one function class. How do I achieve what I need? I heared interfaces can help me out, but I cant figure out what exactly I need to do, since the user cannot instantiate a instance.