[quoted text, click to view] David Chipping wrote:
> Thanks very much for the reply, I think what was actually confusing me
> more, was not what the Import switch actually did, but the almost
> automatic like referencing of the compiler, which seems to be able to
> reference almost all System.* and Microsoft.* assemblies automatically.
>
> Is this hard coded in the compiler, or is it doing something else to
> resolve these references, looking in the GAC, or in the registry?
>
> Thanks very much,
>
> -David
Well, like I said, a lot of classes are provided by mscorlib.dll, which
you are automagically referencing in every project. It contains the
Microsoft.Win32 Registry classes, the basic value types +
AppDomain/Assembly/GC and the basic exceptions within System, plus
stuff for Collections, Globalization, IO, Reflection, Resources,
CompilerServices, InteropServices, Remoting, Serialization,
Crypotgraphy, Threading, plus bits and bobs in other namespaces. Quite
a lot really.
If you add a reference to System.dll, you don't actually get much added
to the System namespace, but a lot more of the Microsoft.Win32 stuff
turns up, plus various stuff deeper inside the System namespace.
System.Drawing only adds stuff inside the System.Drawing namespace and
a couple of sub-namespaces.
Not sure about System.Windows.Forms - I'm in the process of rebuilding
my machine from it crashing hard on Thursday, and I've only pulled one
..NET project over from SourceSafe so far (the one I need to work on at
the moment). The tool I'm using to give you all this info is the Object
Browser within Visual Studio - if you have Visual Studio, you can open
this with Ctrl-Alt-J. I find it useful for exploring which classes are
implemented by which assemblies.
And I've got no idea about anything else that might get forced in by
the compiler - I've never had to delve that deep.
Hope that's been of some help,
Damien