CheckId | NS3003 |
Category | Argument specification |
Accessing call argument by type which is used multiple times in invocation.
A violation of this rule occurs when CallInfo
tries to access argument in call by type which is used multiple times in method arguments.
To fix a violation of this rule, access call argument by type which is unique in method arguments or access call argument by position.
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", "NS3003:There is more than one argument of given type to this call.", Justification = "Reviewed")]
Or for a specific code block:
#pragma warning disable NS3003 // There is more than one argument of given type to this call.
// the code which produces warning
#pragma warning restore NS3003 // There is more than one argument of given type to this call.