RCS1078: Use "" or 'string.Empty'
Properties
Property | Value |
---|---|
Default Severity | disabled by default |
Minimum language version | - |
Examples
Example #1
diagnostic.cs
string s = string.Empty;
fix.cs
string s = "";
Configuration
info
Option roslynator_empty_string_style
is required to be set for this analyzer to work.
.editorconfig
# Prefer 'string.Empty' or empty string literal
roslynator_empty_string_style = field|literal