Skip to main content

RCS0059: Place new line after/before null-conditional operator

Properties

PropertyValue
Default Severitydisabled by default
Minimum language version-

Examples

Example #1

diagnostic.cs
items
.Select(selector)
.FirstOrDefault()
?.ToString()

fix.cs
items
.Select(selector)
.FirstOrDefault()?
.ToString()

Configuration

info

Option roslynator_null_conditional_operator_new_line is required to be set for this analyzer to work.

.editorconfig
# Place new line after/before null-conditional operator
roslynator_null_conditional_operator_new_line = after|before

Applies to