const, enum, immutable, and bool Conversions

Learn about const, enum, immutable, and bool conversions.

const conversions

As you know, reference types can automatically be converted to the const of the same type. Conversion to const is safe because the width of the type does not change and const is a promise to not modify the variable:

Get hands-on with 1000+ tech skills courses.