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)