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

RCS1096: Use bitwise operation instead of calling 'HasFlag'

Property Value
Id RCS1096
Category Performance
Default Severity Info
Enabled by Default
Supports Fade-Out -
Supports Fade-Out Analyzer -

Example

Code with Diagnostic

if (options.HasFlag(RegexOptions.IgnoreCase)) // RCS1096
{
}

Code with Fix

if ((options & RegexOptions.IgnoreCase) != 0)
{
}

See Also

(Generated with DotMarkdown)