I am working on an assignment that specified "Do not use any external libraries". So I created a c# application, and the first thing I did was remove all the dll's references by default... including "System.dll".
However, I can still add this to my code:
using System;
using System.IO;
I was just curious as to how come I do not need to have System.dll as a reference in my project to do this. Thanks!
Think of namespaces as "folders" that contain one or more classes, and that might be defined in one or more assemblies (DLLs). For example, Classes inside the System namespace are defined in 2 assemblies (DLLs): mscorlib. dll and System.
Can a DLL reference another DLL? Any DLL that lays somewhere in file system can be referenced. After compilation this DLL must be either in GAC (Global Assembly Cache) or in same directory with the working application.
The System namespace is the root of all namespaces in the . NET Framework, containing all other namespaces as subordinates.
mscorlib.dll
includes items in both those namespaces.
You need to right-click your project > Properties > Build > Advanced... and check "Do not reference mscorlib.dll" to remove this reference.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With