ReSharper
 
Get ReSharper
Get your hands on the new features ahead of the release by joining the Early Access Program for ReSharper 2025.1! Learn more

Code inspection: Redundant explicit type in array creation

Last modified: 08 April 2024

Starting from C# 3.0, implicitly-typed arrays are supported. The type of an array instance is determined by the type of elements specified in the array initializer, so you do not need to specify the array type explicitly. Such arrays are convenient when you initiate objects or collections.

ReSharper suggests a quick-fix that removes the redundant type specification.