JetBrains Rider 2026.3 Help

Code inspection: Char is possibly unintentionally used as an array size

This inspection reports a character constant used as an array length. C# converts the character to its numeric value, so new char[','] creates an array of 44 elements rather than an array that contains a comma. If you want an array with one element, use an array initializer.

Example

var separator = new char[','];
var separator = new char[] { ',' };

If the numeric length is intentional, make it explicit:

var buffer = new char[44];
27 October 2026