Becaue you aren't ingheriting anything by default.
Adding a reference tells VS that you want to refer to classes within the DLL - either by instantiation them:
MyDLLClass instance = new MyDLLClass();
Or by using the static methods:
string myString = MyDLLClass.StaticMethod();
In addition, you can use these classes as a basis for your ouwn classes via inheritance:
public partial class MyClass : MyDLLClass
{
...
But just because you can reference a class within a DLL file, doesn't mean that you want to in every file: the
using
namespace statemkent just lets VS accept a shortcut: instead of having to type
string s = MyDLLNamepace.MyDLLCLass.StaticMethod();
each time, you can just type the shorter version:
string s = MyDLLCLass.StaticMethod();
But you might not want that in every file - what if you have MyDLLClass in two DLL files, under different namespaces? If it added a
using
to every file automatically when you added a reference, then any existing uses would have a problem trying to work out which version you meant to write.