The ?? operator aka the Null Coalescing Operator
Posté le mar. 04 avril 2017 dans blog
If are familiar to the use of ternary operators, you must have encountered several situations like this one :
:::csharp string pageTitle = getTitle() ? getTitle() : "Default Title";
You would want to call getTitle() only once, but then you wouldn't have a simple one-lined initialization of you variable. Actually there is a simple …
Continuer à lire