> ## Documentation Index
> Fetch the complete documentation index at: https://ancplua.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# AL0015 - Normalize null-guard style

> Null-guards should be normalized to the preferred project style

Source: [AL0015NormalizeNullGuardStyleAnalyzer.cs](https://github.com/ANcpLua/ANcpLua.Analyzers/blob/main/src/ANcpLua.Analyzers/Analyzers/AL0015NormalizeNullGuardStyleAnalyzer.cs)

## Description

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

## Bad Code

```csharp theme={null}
ArgumentNullException.ThrowIfNull(param);
```

## Good Code

```csharp theme={null}
Throw.IfNull(param);
```

## Properties

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

## Configuration

```editorconfig theme={null}
dotnet_diagnostic.AL0015.severity = warning
```
