TypeName | TernaryOperatorAnalyzer (return) |
Check Id | CC0013 |
Category | Style |
Severity | Warning |
If-else statements can be changed to ternary operators.
var something = true;
if (something)
return 1;
else
return 2;
A code fix will be presented to you that will transform the code:
var something = true;
return something ? 1 : 2;
TBD