Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ public int IndexOf(object value)

public void Insert(int index, object value)
{
if ((_count + 1 <= _contents.Length) && (index < Count) && (index >= 0))
if ((_count + 1 <= _contents.Length) && (index <= Count) && (index >= 0))
{
_count++;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
'<snippet01>
Imports System.Collections

Expand Down Expand Up @@ -90,7 +90,7 @@

Public Sub Insert(ByVal index As Integer, ByVal value As Object) Implements IList.Insert

If _count + 1 <= _contents.Length AndAlso index < Count AndAlso index >= 0 Then
If _count + 1 <= _contents.Length AndAlso index <= Count AndAlso index >= 0 Then
_count += 1

For i As Integer = Count - 1 To index Step -1
Expand Down
Loading