Skip to content

Latest commit

 

History

History
50 lines (36 loc) · 1.24 KB

File metadata and controls

50 lines (36 loc) · 1.24 KB

REFL024

Prefer null over empty array

Topic Value
Id REFL024
Severity Warning
Enabled True
Category ReflectionAnalyzers.SystemReflection
Code InvokeAnalyzer

Description

Prefer null over empty array.

Motivation

ADD MOTIVATION HERE

How to fix violations

ADD HOW TO FIX VIOLATIONS HERE

Configure severity

Via ruleset file.

Configure the severity per project, for more info see MSDN.

Via #pragma directive.

#pragma warning disable REFL024 // Prefer null over empty array
Code violating the rule here
#pragma warning restore REFL024 // Prefer null over empty array

Or put this at the top of the file to disable all instances.

#pragma warning disable REFL024 // Prefer null over empty array

Via attribute [SuppressMessage].

[System.Diagnostics.CodeAnalysis.SuppressMessage("ReflectionAnalyzers.SystemReflection", 
    "REFL024:Prefer null over empty array", 
    Justification = "Reason...")]