We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b130de5 commit c90807aCopy full SHA for c90807a
snippets/csharp/System.Collections.Generic/ICollectionT/Overview/program.cs
@@ -198,7 +198,7 @@ public void CopyTo(Box[] array, int arrayIndex)
198
throw new ArgumentNullException("The array cannot be null.");
199
if (arrayIndex < 0)
200
throw new ArgumentOutOfRangeException("The starting array index cannot be negative.");
201
- if (Count > array.Length - arrayIndex + 1)
+ if (Count > array.Length - arrayIndex)
202
throw new ArgumentException("The destination array has fewer elements than the collection.");
203
204
for (int i = 0; i < innerCol.Count; i++) {
0 commit comments