Skip to main content
added 1 characters in body
Source Link
Arturo Martinez
  • 2.6k
  • 1
  • 23
  • 37

You can't do it if v1 is null, but you can check with a functionan operator.

v2 = v1 ?? 0;

You can't do it if v1 is null, but you can check with a function.

v2 = v1 ?? 0;

You can't do it if v1 is null, but you can check with an operator.

v2 = v1 ?? 0;
Source Link
Arturo Martinez
  • 2.6k
  • 1
  • 23
  • 37

You can't do it if v1 is null, but you can check with a function.

v2 = v1 ?? 0;