Skip to main content
Source: AL0125UseStringComparisonAnyExtensionsAnalyzer.cs

Description

Chained string equality comparisons (s == “a” || s == “b”) can be collapsed into a single EqualsAnyOrdinal/EqualsAnyIgnoreCase call.

Properties

  • Category: Roslyn Utilities
  • Severity: Info
  • Enabled by default: True
  • Code fix available: False

Configuration

dotnet_diagnostic.AL0125.severity = info