Why this matters
Encodes intent and prevents accidental modifications.
Expose read-only views (IReadOnlyList/IReadOnlyCollection) from APIs that should not allow mutation.
Encodes intent and prevents accidental modifications.
Side-by-side examples engineers can pattern-match during review.
public List<Item> Items { get; }public IReadOnlyList<Item> Items { get; }List<T> exposed publiclyIReadOnlyList<T> exposedFrom the same buckets as this rule.