CC0008 will be incorrectly raised in this code:
var ys = new System.Collections.Generic.List<int> { 4 };
ys.Capacity = 3;
CC0009 will be incorrectly raised in this code:
new System.Collections.Generic.List<int> ys;
ys = new System.Collections.Generic.List<int> { 4 };
ys.Capacity = 3;
This will cause an error on the code fix, but the problem is with the analyzer, which is not checking initialization with a collection initializer.
CC0008will be incorrectly raised in this code:CC0009will be incorrectly raised in this code:This will cause an error on the code fix, but the problem is with the analyzer, which is not checking initialization with a collection initializer.