Skip to content

Latest commit

 

History

History
38 lines (28 loc) · 1.02 KB

File metadata and controls

38 lines (28 loc) · 1.02 KB

NS3005

CheckId NS3005
Category Argument specification

Cause

Assigning call argument which is not ref nor out argument.

Rule description

A violation of this rule occurs when CallInfo tries to assign non-out or non-ref argument.

How to fix violations

To fix a violation of this rule, mark method argument with ref or out parameter modifier, or remove assignment to non-out/non-ref parameter.

How to suppress violations

This warning can be suppressed by disabling the warning in the ruleset file for the project. The warning can also be suppressed programmatically for an assembly:

[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Argument specification", "NS3005:Could not set argument.", Justification = "Reviewed")]

Or for a specific code block:

#pragma warning disable NS3005 // Could not set argument.
// the code which produces warning
#pragma warning disable NS3005 // Could not set argument.