Why this matters
Mutable fields can lead to unintended modifications. Use `readonly` for instance fields and `const` for compile-time constants.
Ensure that immutable instance fields are marked as `readonly`, and compile-time constants are marked as `const`.
Mutable fields can lead to unintended modifications. Use `readonly` for instance fields and `const` for compile-time constants.
Side-by-side examples engineers can pattern-match during review.
public int MaxValue = 100;
public const int MaxValue = 100;
public int MaxValue = 100;
public const int MaxValue = 100;
From the same buckets as this rule.