.NET Framework Version: 4.7.2
ObservableCollections Version: 3.3.4
I am trying this code, but it raised an ArgumentOutOfRangeException in the RemoveRange method.
Incidentally, no exceptions occurred in .NET 8.
Code
ObservableList<int> list = new ObservableList<int> { 1, 2, 3, 4, 5 };
list.RemoveRange(1, 3);
list.ForEach(x => Console.Write(x + ",")); // Expected : 1,5,
Stack trace
System.ArgumentOutOfRangeException
HResult=0x80131502
Message=指定された引数は、有効な値の範囲内にありません。
パラメーター名:start
Source=ObservableCollections
スタック トレース:
at ObservableCollections.ObservableList`1.RemoveRange(Int32 index, Int32 count)
at SandBox4._7._2.Program.Main(String[] args) in D:\Repositories\SandBox\SandBox4.7.2\Program.cs:line 11