Expand Ternary Expression
Converts a ternary expression into an if/else block.
- when the caret is on an expression containing a ternary operator (“? :” operator in C# and C++, IIf operator in Visual Basic).
- This refactoring is the functional opposite of Compress to Ternary Expression.
b = a ? 10 : 20;
b = If(a, 10, 20)
if (a) b = 10; else b = 20;
If a Then b = 10 Else b = 20 End If