Code inspection: Append to collection expressionLast modified: 08 April 2024 Category: Language Usage Opportunities ID: AppendToCollectionExpression EditorConfig: resharper_append_to_collection_expression_highlighting Default severity: Suggestion Language: C# Requires SWA: NotipYou can suppress this inspection to ignore specific issues, change its severity level to make the issues less or more noticeable, or disable it altogether.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:Suboptimal codeList<string> numbers = ["one", "two"];numbers.Add("three");numbers.Add("four");After the fixList<string> numbers =[ "one", "two", "three", "four"];