Skip to main content
Source: Al0048UseGuardNotNegativeAnalyzer.cs

Description

Use Guard.NotNegative() instead of verbose negative-check and throw patterns.

Bad Code

Good Code

Properties

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

Configuration