@@ -1127,11 +1127,11 @@ public static int FindIndex<T>(T[] array, int startIndex, int count, Predicate<T
1127
1127
}
1128
1128
1129
1129
if ( startIndex < 0 || startIndex > array . Length ) {
1130
- ThrowArgumenStartIndexOutOfRange ( ) ;
1130
+ ThrowArgumentStartIndexOutOfRange ( ) ;
1131
1131
}
1132
1132
1133
1133
if ( count < 0 || startIndex > array . Length - count ) {
1134
- ThrowArgumenCountOutOfRange ( ) ;
1134
+ ThrowArgumentCountOutOfRange ( ) ;
1135
1135
}
1136
1136
1137
1137
if ( match == null ) {
@@ -1196,19 +1196,19 @@ public static int FindLastIndex<T>(T[] array, int startIndex, int count, Predica
1196
1196
if ( array . Length == 0 ) {
1197
1197
// Special case for 0 length List
1198
1198
if ( startIndex != - 1 ) {
1199
- ThrowArgumenStartIndexOutOfRange ( ) ;
1199
+ ThrowArgumentStartIndexOutOfRange ( ) ;
1200
1200
}
1201
1201
}
1202
1202
else {
1203
1203
// Make sure we're not out of range
1204
1204
if ( startIndex < 0 || startIndex >= array . Length ) {
1205
- ThrowArgumenStartIndexOutOfRange ( ) ;
1205
+ ThrowArgumentStartIndexOutOfRange ( ) ;
1206
1206
}
1207
1207
}
1208
1208
1209
1209
// 2nd have of this also catches when startIndex == MAXINT, so MAXINT - 0 + 1 == -1, which is < 0.
1210
1210
if ( count < 0 || startIndex - count + 1 < 0 ) {
1211
- ThrowArgumenCountOutOfRange ( ) ;
1211
+ ThrowArgumentCountOutOfRange ( ) ;
1212
1212
}
1213
1213
1214
1214
int endIndex = startIndex - count ;
@@ -1296,9 +1296,9 @@ public static int IndexOf(Array array, Object value, int startIndex, int count)
1296
1296
1297
1297
int lb = array . GetLowerBound ( 0 ) ;
1298
1298
if ( startIndex < lb || startIndex > array . Length + lb )
1299
- ThrowArgumenStartIndexOutOfRange ( ) ;
1299
+ ThrowArgumentStartIndexOutOfRange ( ) ;
1300
1300
if ( count < 0 || count > array . Length - startIndex + lb )
1301
- ThrowArgumenCountOutOfRange ( ) ;
1301
+ ThrowArgumentCountOutOfRange ( ) ;
1302
1302
1303
1303
// Try calling a quick native method to handle primitive types.
1304
1304
int retVal ;
@@ -1367,11 +1367,11 @@ public static int IndexOf<T>(T[] array, T value, int startIndex, int count) {
1367
1367
}
1368
1368
1369
1369
if ( startIndex < 0 || startIndex > array . Length ) {
1370
- ThrowArgumenStartIndexOutOfRange ( ) ;
1370
+ ThrowArgumentStartIndexOutOfRange ( ) ;
1371
1371
}
1372
1372
1373
1373
if ( count < 0 || count > array . Length - startIndex ) {
1374
- ThrowArgumenCountOutOfRange ( ) ;
1374
+ ThrowArgumentCountOutOfRange ( ) ;
1375
1375
}
1376
1376
Contract . Ensures ( Contract . Result < int > ( ) < array . Length ) ;
1377
1377
Contract . EndContractBlock ( ) ;
@@ -1433,9 +1433,9 @@ public static int LastIndexOf(Array array, Object value, int startIndex, int cou
1433
1433
}
1434
1434
1435
1435
if ( startIndex < lb || startIndex >= array . Length + lb )
1436
- ThrowArgumenStartIndexOutOfRange ( ) ;
1436
+ ThrowArgumentStartIndexOutOfRange ( ) ;
1437
1437
if ( count < 0 )
1438
- ThrowArgumenCountOutOfRange ( ) ;
1438
+ ThrowArgumentCountOutOfRange ( ) ;
1439
1439
if ( count > startIndex - lb + 1 )
1440
1440
throw new ArgumentOutOfRangeException ( "endIndex" , Environment . GetResourceString ( "ArgumentOutOfRange_EndIndexStartIndex" ) ) ;
1441
1441
if ( array . Rank != 1 )
@@ -1509,24 +1509,24 @@ public static int LastIndexOf<T>(T[] array, T value, int startIndex, int count)
1509
1509
// accept -1 and 0 as valid startIndex for compablility reason.
1510
1510
//
1511
1511
if ( startIndex != - 1 && startIndex != 0 ) {
1512
- ThrowArgumenStartIndexOutOfRange ( ) ;
1512
+ ThrowArgumentStartIndexOutOfRange ( ) ;
1513
1513
}
1514
1514
1515
1515
// only 0 is a valid value for count if array is empty
1516
1516
if ( count != 0 ) {
1517
- ThrowArgumenCountOutOfRange ( ) ;
1517
+ ThrowArgumentCountOutOfRange ( ) ;
1518
1518
}
1519
1519
return - 1 ;
1520
1520
}
1521
1521
1522
1522
// Make sure we're not out of range
1523
1523
if ( startIndex < 0 || startIndex >= array . Length ) {
1524
- ThrowArgumenStartIndexOutOfRange ( ) ;
1524
+ ThrowArgumentStartIndexOutOfRange ( ) ;
1525
1525
}
1526
1526
1527
1527
// 2nd have of this also catches when startIndex == MAXINT, so MAXINT - 0 + 1 == -1, which is < 0.
1528
1528
if ( count < 0 || startIndex - count + 1 < 0 ) {
1529
- ThrowArgumenCountOutOfRange ( ) ;
1529
+ ThrowArgumentCountOutOfRange ( ) ;
1530
1530
}
1531
1531
1532
1532
return EqualityComparer < T > . Default . LastIndexOf ( array , value , startIndex , count ) ;
@@ -2648,12 +2648,12 @@ private static void ThrowElementTypeNullException()
2648
2648
throw new ArgumentNullException ( "elementType" ) ;
2649
2649
}
2650
2650
2651
- private static void ThrowArgumenCountOutOfRange ( )
2651
+ private static void ThrowArgumentCountOutOfRange ( )
2652
2652
{
2653
2653
throw new ArgumentOutOfRangeException ( "count" , Environment . GetResourceString ( "ArgumentOutOfRange_Count" ) ) ;
2654
2654
}
2655
2655
2656
- private static void ThrowArgumenStartIndexOutOfRange ( )
2656
+ private static void ThrowArgumentStartIndexOutOfRange ( )
2657
2657
{
2658
2658
throw new ArgumentOutOfRangeException ( "startIndex" , Environment . GetResourceString ( "ArgumentOutOfRange_Index" ) ) ;
2659
2659
}
0 commit comments