computers, programming, science fiction, beer
if (myList != null) { return myList; } else { return null; }
return myList ?? null;
Don't forget the name: null coalescing operator.The operator can be chained as well:string setting = userValue ?? configValue ?? "some default";
Oui.
Don't forget the name: null coalescing operator.
ReplyDeleteThe operator can be chained as well:
string setting = userValue ?? configValue ?? "some default";
Oui.
ReplyDelete