3 ms·
Basically, complex initialization logic, when a field can be initialized in multiple different ways. Once the initialization step is complete, the field will n
by norswap 10y ago
Basically, complex initialization logic, when a field can be initialized in multiple different ways.
Once the initialization step is complete, the field will never be null and no checking will be required ever again. But in the current state of affairs, you just have to make it nullable and sprinkle the `!!` operator all over your code.
- vbezhenar 10y agoUse two properties. First is nullable and holds real value, so you can check it. Second is non-nullable and just a getter for first.