Skip to main content
Source: AL0015NormalizeNullGuardStyleAnalyzer.cs

Description

Null-guards should be normalized to the preferred project style (Throw, BCL, or Portable).

Bad Code

ArgumentNullException.ThrowIfNull(param);

Good Code

Throw.IfNull(param);

Properties

  • Category: Style
  • Severity: Info
  • Enabled by default: True
  • Code fix available: True

Configuration

dotnet_diagnostic.AL0015.severity = warning