Exception:索引必须位于该列表的界限内。 参数名: index

报错信息 1
ArgumentOutOfRangeException: 索引必须位于该列表的界限内。
参数名: index
--Message: 索引必须位于该列表的界限内。
参数名: index
StackTrace:
   在 System.ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument argument, ExceptionResource resource)
   在 System.Collections.ObjectModel.Collection`1.Insert(Int32 index, T item)
   在 __ScriptExecution.__np2j92i0.Program.<>c__DisplayClass1_0.<Exec>b__4(Boolean isAbove)
   在 System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
   在 System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
   在 System.Windows.Controls.MenuItem.InvokeClickAfterRender(Object arg)
   在 System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   在 System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)

版本:1.45.0 2026-03-01 12:57 Microsoft Windows NT 10.0.26200.0