Null vs IsNone?

Quasimodem

New member
Hello, I'm having a bit of trouble figuring out how to property "null check" a SharedVariable. There seem to be 3 options:
  1. Null-check the variable itself
  2. Null-check the variable's Value property
  3. Check the IsNone property of the variable
The answer seems to depend on whether the variable has been marked [SharedRequried] or [RequiredField], but more often than not, it seems the correct answer "do them all just to be safe".

This is pretty tedious and I'd like to avoid the overhead, can you advise as to the best way to go about this? Thank you!
 
In most situations you only need to do check number 2. The variable itself will always be a non-null value so you don't ever need to do check number 1. Check number 3 used by the attributes.
 
Top