Module

Learn how Ice modules are mapped to C#

An Ice module maps to a C# namespace with the same name converted to Pascal case.

The mapping preserves the nesting of the Ice definitions. For example:

ice
module M1::M2
{
// ...
}
// ...
// Reopen M1
module M1
{
// ...
}
C#
namespace M1.M2
{
// ...
}
// ...
// Reopen M1
namespace M1
{
// ...
}

The metadata directive "cs:identifier" allows you to map a module to a C# namespace or sub-namespace of your choice. For example:

ice
// module Time becomes namespace Remote.Clock in C#.
module Time
{
// ...
}

You can only use "cs:identifier" on a module with a simple name: this metadata directive is not compatible with the nested module syntax.

Was this page helpful?

CookiesYour privacy
This website uses cookies to analyze traffic and improve your experience.
By clicking "Accept," you consent to the use of these cookies. You can learn more about our cookies policy in our Privacy Policy.