For example, the
myfunction
whose return value may be a nullable int. In such cases, you can use the coalescing operator to quickly check if it is null and return an alternate value.int myExpectedValueIfNull = 10;
int expectedValue = myfunction() ?? myExpectedValueIfNull
No comments:
Post a Comment