All docs
V19.2
19.2
19.1
18.2
The page you are viewing does not exist in version 18.2. This link will take you to the root page.
18.1
The page you are viewing does not exist in version 18.1. This link will take you to the root page.
17.2
The page you are viewing does not exist in version 17.2. This link will take you to the root page.

CRR0046 - Redundant field initialization

This analyzer identifies redundant field initialization values, which can be removed to improve code readability.

public int sum = 0;

To fix the issue, remove the field's redundant default value:

public int sum;

Call the Remove Redundant Assignment refactoring to remove the redundant field initialization.