C#


ROSLYN.USAGE.CA2244 : Do not duplicate indexed element initializations (C#)

See Roslyn-Detected C# Warning Classes for more information.

Summary

Indexed elements in objects initializers must initialize unique elements. A duplicate index might overwrite a previous element initialization.

This check corresponds to Roslyn rule CA2244. For full rule details, see the Microsoft website: CA2244.

Properties

Class Name Do not duplicate indexed element initializations (C#)
Significance reliability
Mnemonic ROSLYN.USAGE.CA2244
Categories None
Availability Available for C# only.
Enabling Checks for this warning class are enabled by default. To disable them, add the following WARNING_FILTER rule to the project configuration file.
WARNING_FILTER += discard class="Do not duplicate indexed element initializations (C#)"

Relevant Configuration File Parameters

The following configuration file parameters affect checks for this warning class.