The Freya Programming Language

Static classes

See also

Static classes are special classes declared with the static modifier. All members declared inside a static class are automatically marked as static members.

Static classes

Static classes are declared like this:

MyStaticClass = static class
    members...
end;

You cannot explicitly mark as static a member inside a static class. The static class is transformed by the compiler into an abstract sealed class.

Static classes are often used to simulate the global procedures used by other programming languages. They can also contain extension methods.

See also

The Freya Programming Language
Classes
Constant types
Type declarations
Nested types
Record declarations
Interface declarations
Type members