Non-Nullable Types

Similar to how value types can be made nullable in standard C# by suffixing the typename with a question mark (?), RemObjects C# allows reference types – which are nullable by default – to be marked as not nullable by suffixing the type name with an exclamation point (!).

This can make for more robust code, as variables, fields, properties or parameters declared as such can be relied on to not be null.

Int32 i1;                       // non-nullable by default, 0
Button b1;                      // nullable by default, null

Int32? i2;                      // nullable, null
Button! b2 = new Button();      // not nullable, thus needs initialization

Please refer to the Nullability topic in the Language Concepts section for more detailed coverage.