Permalink
Fetching contributors…
Cannot retrieve contributors at this time
35 lines (25 sloc) 784 Bytes

RCS1155: Use StringComparison when comparing strings

Property Value
Id RCS1155
Category Usage
Default Severity Warning
Enabled by Default
Supports Fade-Out -
Supports Fade-Out Analyzer -

Example

Code with Diagnostic

if (x.ToLower() == y.ToLower()) // RCS1155
{
}

Code with Fix

if (string.Equals(x, y, StringComparison.OrdinalIgnoreCase))
{
}

See Also

(Generated with DotMarkdown)