DLang Notes and Examples
← prev | next →     Top-level ToC     /properties.html     (printable version)

Variables, values, and types can have properties. For example:

auto foo = ... ;
foo.init         // default initialization value (0 for ints, nan for floats)
foo.sizeof       // how many bytes it takes up
foo.min, foo.max // min & max value it can hold

Note:

int x = 29;
// All of these are the same:
int.sizeof == x.sizeof == 29.sizeof