Jagged array creation with wrong size specified does not show as error.

This code should show as an error but does not:

var array1 = new object?[][3];

This code is ok:

var array2 = new object?[3][];

This code should show an error and does:

var array3 = new object?[][];

Hello Dave,

Thanks for your comment. Unfortunately, it looks like you have faced a known issue: 

RSRP-477302 Rider does not highlight error in invalid initialization for multidimension array. 

We are still reviewing the feature request, and Rider will show the CS1586 error when ReSharper backend realized the corresponding static analyze feature.

We would appreciate it if you would upvote it in order to bring increased awareness to the issue. One can also click Watch to monitor the status. Thanks for your understanding!





ok thanks, wow known issue for 4 years, ok.


Dave Cousineau  Sorry for the inconvenience bring to you.

It would be nice if you could vote the YouTrack issue, and we will update the status of problem fixes on it.


Please sign in to leave a comment.