Fix S3878 FP: Jagged arrays #8163
Labels
Area: C#
C# rules related issues.
Area: VB.NET
VB.NET rules related issues.
Sprint: Hardening
Fix FPs/FNs/improvements
Type: False Positive
Rule IS triggered when it shouldn't be.
Milestone
Description
When a C# method has an array of arrays as
params
parameter, S3878 is raised when the method is called. e.g. forFollowing the S3878 suggestion to "remove the array creation and simply pass the elements" will result in a compiler error (type mismatch "cannot convert from object to object[]").
Expected behavior
No issue is raised.
Actual behavior
S3878 is raised.
Known workarounds
Move the array creation to a separate variable, then pass that variable as method parameter.
Related information
The text was updated successfully, but these errors were encountered: