Query module MissedTernaryOpportunity

name
Missed ternary opportunity
description
An ‘if’ statement where both branches either (a) return or (b) write to the same variable can often be expressed more clearly using the ‘?’ operator.
kind
problem
problem.severity
recommendation
precision
high
id
cs/missed-ternary-operator
tags
maintainability language-features

Imports

StructuralComparison

Provides functionality for performing structural comparison of expressions and statements.

csharp

The default C# QL library.

Classes