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

Code inspection: Append to collection expression

Last modified: 08 April 2024

If a collection expression is immediately followed by Add() calls on the collection, JetBrains Rider suggests improving the structure and readability of the code by integrating the added items into the collection expression: