Could an example be provided for cases where we have initialized our array but we still do not know all the values.
Example:
string[] fraudulentOrderIds = new string[3]; currently still gives the 'Collection initialization can be simplified' warning/flag.
Any advice on this would be welcome. Appreciate your work.
Type of issue
Missing information
Description
Could an example be provided for cases where we have initialized our array but we still do not know all the values. Example:
string[] fraudulentOrderIds = new string[3];
currently still gives the 'Collection initialization can be simplified' warning/flag. Any advice on this would be welcome. Appreciate your work.Page URL
https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/style-rules/ide0300
Content source URL
https://github.com/dotnet/docs/blob/main/docs/fundamentals/code-analysis/style-rules/ide0300.md
Document Version Independent Id
06844c7c-ca82-876d-36ba-c69b21b8fe06
Article author
@gewarren
Metadata