Skip to main content
Source: AL0003DontDivideByConstantZeroAnalyzer.cs

Description

Integers and Decimal should never be divided by the constant 0 as this causes a DivideByZeroException at runtime.

Bad Code

Good Code

Properties

  • Category: Reliability
  • Severity: Error
  • Enabled by default: True
  • Code fix available: False

Configuration