CheckId | NS3005 |
Category | Argument specification |
Assigning call argument which is not ref nor out argument.
A violation of this rule occurs when CallInfo
tries to assign non-out or non-ref argument.
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.
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.