Permalink
Fetching contributors…
Cannot retrieve contributors at this time
31 lines (21 sloc) 798 Bytes

RCS1084: Use coalesce expression instead of conditional expression

Property Value
Id RCS1084
Category Simplification
Default Severity Info
Enabled by Default
Supports Fade-Out -
Supports Fade-Out Analyzer -

Example

Code with Diagnostic

string x = (s != null) ? s : ""; // RCS1084

Code with Fix

string x = s ?? "";

See Also

(Generated with DotMarkdown)