ReSharper 2026.1 Help

Code inspection: Array creation can be replaced with array initializer

This inspection reports an array creation expression when the surrounding code already provides the array type, so the explicit new T[...] part is unnecessary. Removing it makes the initializer shorter without changing behavior.

This commonly appears in field initializers, variable initializers, and return statements where the target type is already known.

class C { private readonly string[,] _items = new string[,] { { "" }, { "" } }; }
class C { private readonly string[,] _items = { { "" }, { "" } }; }
13 April 2026