File tree Expand file tree Collapse file tree
csharp/System.Collections/IList/Overview
visualbasic/System.Collections/IList/Overview Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -103,7 +103,7 @@ public int IndexOf(object value)
103103
104104 public void Insert ( int index , object value )
105105 {
106- if ( ( _count + 1 <= _contents . Length ) && ( index < Count ) && ( index >= 0 ) )
106+ if ( ( _count + 1 <= _contents . Length ) && ( index <= Count ) && ( index >= 0 ) )
107107 {
108108 _count ++ ;
109109
Original file line number Diff line number Diff line change @@ -90,7 +90,7 @@ Public Class SimpleList
9090
9191 Public Sub Insert( ByVal index As Integer , ByVal value As Object ) Implements IList.Insert
9292
93- If _count + 1 <= _contents.Length AndAlso index < Count AndAlso index >= 0 Then
93+ If _count + 1 <= _contents.Length AndAlso index <= Count AndAlso index >= 0 Then
9494 _count += 1
9595
9696 For i As Integer = Count - 1 To index Step - 1
You can’t perform that action at this time.
0 commit comments