[Mono-list] About the System namespace

Fergus Henderson fjh@cs.mu.oz.au
Thu, 12 Jul 2001 01:15:21 +1000

On 10-Jul-2001, Sebastien Lambla <sebastien.lambla@6sens.com> wrote:
> as far as I understand, some classes will be built on top of existing
> components. For other classes completely written on top of C# and the
> framework, wouldn't it be better to have them published in another namespace
> on windows systems so as to provide an open source equivalent to the System
> namespace, such as FreeSystem?

Well, in theory it would be best to keep the namespace the same, and use a
different assembly name.  That way you won't need to edit your source code
to switch between the open-source version and the mscorlib version,
you just change the compilation options and recompile.

This works because at the IL level, everything is actually qualified by an
assembly name as well as a namespace name.  E.g. "[mscorlib]System.Object".

In practice some parts of the System namespace (e.g. System.Object)
are actually part of the runtime and can't be replaced in a way
that preserves their properties (e.g. System.Object being the root
of the inheritence hierarchy).  Those parts should be put in a separate

Fergus Henderson <fjh@cs.mu.oz.au>  |  "I have always known that the pursuit
The University of Melbourne         |  of excellence is a lethal habit"
WWW: <http://www.cs.mu.oz.au/~fjh>  |     -- the last words of T. S. Garp.