There is a ??
operator that essentially is the same as COALESCE
operator in SQL:
int? a = null; //int? - nullable int
int q = a??1; // q is set to one;
However, ??
does not check the string for emptiness, so it does not share the same meaning as javascript's ||
, which treats empty strings as false as well.