OK, I’m a little behind the times, but I just found out there was a neat way to sidestep 90% of the null checks I do in my ternary operators:
output = (value == null) ? "NULL" : value;
becomes
output = (value ?? "NULL");
(h/t R. Aaron Zupancic)
OK, I’m a little behind the times, but I just found out there was a neat way to sidestep 90% of the null checks I do in my ternary operators:
output = (value == null) ? "NULL" : value;
becomes
output = (value ?? "NULL");
(h/t R. Aaron Zupancic)