I think it's the same bug as #38, In some cases, values were not added correctly when executing ObvervableList.AddRange.
static IEnumerable<int> Range(int count)
{
foreach (var x in Enumerable.Range(0, count))
{
yield return x;
}
}
var list = new ObservableList<int>();
list.AddRange(Range(20));
The cause is that when CloneCollection<T>.TryEnsureCapacity is executed, the items from the old array are not copied to the new array.
Therefore, I have modified the old array items to be copied to the new array as well.
I think it's the same bug as #38, In some cases, values were not added correctly when executing
ObvervableList.AddRange
.The cause is that when
CloneCollection<T>.TryEnsureCapacity
is executed, the items from the old array are not copied to the new array. Therefore, I have modified the old array items to be copied to the new array as well.