You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
IDE0306 Collection initialization can be simplified
triggers for code such as:
vararray=new[]{1,2,3};Dictionary<int,int>dict;Queue<int>queue;// IDE0306 on those lines:dict=new(array.Select(i =>KeyValuePair.Create(i,i)));queue=new(array);
For both cases, applying the suggested fix creates incorrect code with the [.. notation]
Expected: IDE0306 doesn't trigger on such lines (when there is no Add method?)
The text was updated successfully, but these errors were encountered:
Analyzer
IDE0306 Collection initialization can be simplified
triggers for code such as:
For both cases, applying the suggested fix creates incorrect code with the [.. notation]
Expected: IDE0306 doesn't trigger on such lines (when there is no Add method?)
The text was updated successfully, but these errors were encountered: