Skip to end of metadata
Go to start of metadata

import TARGET (from ASSEMBLY)? (as ALIAS)?

The import construct makes all the members of the imported target available to the current module. So instead of writing:

one can write:

The target can be either a namespace or a type. When it's a type, all the type's static members can be referenced directly by name. So the previous example could be simplified even further:

The from clause can be used to specify an additional assembly reference as well as to disambiguate namespaces. When using a Namespace that is not defined in an assembly with the name of the Namespace, you should use from:

from also accepts a quoted string as argument for weird named assemblies:

And speaking of assembly references, the boo compiler automatically add 4 assembly references before compiling any code: Boo, Boo.Lang.Compiler, (ms)corlib and System.

  • No labels