Converts a ternary expression to an equivalent null coalescing operation and vice versa. Use of the null coalescing operations is the most compact way to specify null expressions in C#.
The Compress to Null Coalescing Operation Refactoring is available when the caret is inside a "? :" operator (short form of if). The operator should compare a variable to null. The same variable should be one of two alternative results.
The Expand Null Coalescing Operation is available when the caret is on a statement that uses the ?? operator.
Place the caret on a compressible ternary expression.
The blinking cursor shows the caret's position at which the Refactoring is available.