You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Feb 13, 2025. It is now read-only.
thrownewArgumentException($"{nameof(index)} + {nameof(count)} must be less than or equal to the ObservableCollection.Count.");
235
+
thrownewArgumentException("Offset and length were out of bounds for the array or count is greater than the number of items from index to the end of the source collection.");
233
236
}
234
237
235
238
ArgumentNullException.ThrowIfNull(match);
@@ -292,7 +295,7 @@ public int RemoveAll(int index, int count, Predicate<T> match)
292
295
}
293
296
294
297
/// <summary>
295
-
/// Removes the first occurence of each item in the specified collection from the <see cref="ObservableCollection{T}"/>.
298
+
/// Removes the first occurence of each item in the specified collection from this <see cref="ObservableCollection{T}"/>.
296
299
/// <para>NOTE: Removed items starting index is not set because items are not guaranteed to be consecutive.</para>
297
300
/// </summary>
298
301
/// <param name="collection">The items to remove.</param>
@@ -344,19 +347,20 @@ public int RemoveRange(IEnumerable<T> collection)
344
347
}
345
348
else
346
349
{
347
-
// changedItems cannot be IEnumerable(lazy type).
350
+
// changedItems cannot be IEnumerable(lazy evaluation).
thrownewArgumentException($"{nameof(index)} + {nameof(count)} must be less than or equal to the ObservableCollection.Count.");
378
+
thrownewArgumentException("Offset and length were out of bounds for the array or count is greater than the number of items from index to the end of the source collection.");
375
379
}
376
380
377
381
if(count==0)
@@ -410,34 +414,37 @@ public void RemoveRange(int index, int count)
410
414
/// Clears the current collection and replaces it with the specified item, using <see cref="Comparer"/>.
411
415
/// </summary>
412
416
/// <param name="item">The item to fill the collection with, after clearing it.</param>
413
-
publicvoidReplace(Titem)
417
+
/// <returns>Returns the amount of change in the number of current collection.</returns>
418
+
publicintReplace(Titem)
414
419
{
415
-
ReplaceRange(0,Count,new[]{item});
420
+
returnReplaceRange(0,Count,new[]{item});
416
421
}
417
422
418
423
/// <summary>
419
424
/// Clears the current collection and replaces it with the specified collection, using <see cref="Comparer"/>.
420
425
/// </summary>
421
426
/// <param name="collection">The items to fill the collection with, after clearing it.</param>
427
+
/// <returns>Returns the amount of change in the number of current collection.</returns>
422
428
/// <exception cref="ArgumentNullException"><paramref name="collection"/> is null.</exception>
423
-
publicvoidReplaceRange(IEnumerable<T>collection)
429
+
publicintReplaceRange(IEnumerable<T>collection)
424
430
{
425
-
ReplaceRange(0,Count,collection);
431
+
returnReplaceRange(0,Count,collection);
426
432
}
427
433
428
434
/// <summary>
429
435
/// Removes the specified range and inserts the specified collection in its position, leaving equal items in equal positions intact.
430
-
/// <para>When index and count are equal to 0, it is equivalent to InsertRange(0, collection).</para>
436
+
/// <para>When both index and count are equal to 0, it is equivalent to InsertRange(0, collection).</para>
431
437
/// </summary>
432
438
/// <remarks>This method is roughly equivalent to <see cref="RemoveRange(Int32, Int32)"/> then <see cref="InsertRange(Int32, IEnumerable{T})"/>.</remarks>
433
439
/// <param name="index">The index of where to start the replacement.</param>
434
440
/// <param name="count">The number of items to be replaced.</param>
435
441
/// <param name="collection">The collection to insert in that location.</param>
442
+
/// <returns>Returns the amount of change in the number of current collection.</returns>
436
443
/// <exception cref="ArgumentOutOfRangeException"><paramref name="index"/> is out of range.</exception>
437
444
/// <exception cref="ArgumentOutOfRangeException"><paramref name="count"/> is out of range.</exception>
445
+
/// <exception cref="ArgumentException"/>
438
446
/// <exception cref="ArgumentNullException"><paramref name="collection"/> is null.</exception>
439
-
/// <exception cref="ArgumentNullException"><see cref="Comparer"/> is null.</exception>
thrownewArgumentException($"{nameof(index)} + {nameof(count)} must be less than or equal to the ObservableCollection.Count.");
481
+
thrownewArgumentException("Offset and length were out of bounds for the array or count is greater than the number of items from index to the end of the source collection.");
0 commit comments