Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

Commit 37caf55

Browse files
committed
Fix typo
1 parent 96e06a9 commit 37caf55

File tree

1 file changed

+17
-17
lines changed

1 file changed

+17
-17
lines changed

src/mscorlib/src/System/Array.cs

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1127,11 +1127,11 @@ public static int FindIndex<T>(T[] array, int startIndex, int count, Predicate<T
11271127
}
11281128

11291129
if( startIndex < 0 || startIndex > array.Length ) {
1130-
ThrowArgumenStartIndexOutOfRange();
1130+
ThrowArgumentStartIndexOutOfRange();
11311131
}
11321132

11331133
if (count < 0 || startIndex > array.Length - count) {
1134-
ThrowArgumenCountOutOfRange();
1134+
ThrowArgumentCountOutOfRange();
11351135
}
11361136

11371137
if( match == null) {
@@ -1196,19 +1196,19 @@ public static int FindLastIndex<T>(T[] array, int startIndex, int count, Predica
11961196
if(array.Length == 0) {
11971197
// Special case for 0 length List
11981198
if( startIndex != -1) {
1199-
ThrowArgumenStartIndexOutOfRange();
1199+
ThrowArgumentStartIndexOutOfRange();
12001200
}
12011201
}
12021202
else {
12031203
// Make sure we're not out of range
12041204
if ( startIndex < 0 || startIndex >= array.Length) {
1205-
ThrowArgumenStartIndexOutOfRange();
1205+
ThrowArgumentStartIndexOutOfRange();
12061206
}
12071207
}
12081208

12091209
// 2nd have of this also catches when startIndex == MAXINT, so MAXINT - 0 + 1 == -1, which is < 0.
12101210
if (count < 0 || startIndex - count + 1 < 0) {
1211-
ThrowArgumenCountOutOfRange();
1211+
ThrowArgumentCountOutOfRange();
12121212
}
12131213

12141214
int endIndex = startIndex - count;
@@ -1296,9 +1296,9 @@ public static int IndexOf(Array array, Object value, int startIndex, int count)
12961296

12971297
int lb = array.GetLowerBound(0);
12981298
if (startIndex < lb || startIndex > array.Length + lb)
1299-
ThrowArgumenStartIndexOutOfRange();
1299+
ThrowArgumentStartIndexOutOfRange();
13001300
if (count < 0 || count > array.Length - startIndex + lb)
1301-
ThrowArgumenCountOutOfRange();
1301+
ThrowArgumentCountOutOfRange();
13021302

13031303
// Try calling a quick native method to handle primitive types.
13041304
int retVal;
@@ -1367,11 +1367,11 @@ public static int IndexOf<T>(T[] array, T value, int startIndex, int count) {
13671367
}
13681368

13691369
if (startIndex < 0 || startIndex > array.Length ) {
1370-
ThrowArgumenStartIndexOutOfRange();
1370+
ThrowArgumentStartIndexOutOfRange();
13711371
}
13721372

13731373
if (count < 0 || count > array.Length - startIndex) {
1374-
ThrowArgumenCountOutOfRange();
1374+
ThrowArgumentCountOutOfRange();
13751375
}
13761376
Contract.Ensures(Contract.Result<int>() < array.Length);
13771377
Contract.EndContractBlock();
@@ -1433,9 +1433,9 @@ public static int LastIndexOf(Array array, Object value, int startIndex, int cou
14331433
}
14341434

14351435
if (startIndex < lb || startIndex >= array.Length + lb)
1436-
ThrowArgumenStartIndexOutOfRange();
1436+
ThrowArgumentStartIndexOutOfRange();
14371437
if (count < 0)
1438-
ThrowArgumenCountOutOfRange();
1438+
ThrowArgumentCountOutOfRange();
14391439
if (count > startIndex - lb + 1)
14401440
throw new ArgumentOutOfRangeException("endIndex", Environment.GetResourceString("ArgumentOutOfRange_EndIndexStartIndex"));
14411441
if (array.Rank != 1)
@@ -1509,24 +1509,24 @@ public static int LastIndexOf<T>(T[] array, T value, int startIndex, int count)
15091509
// accept -1 and 0 as valid startIndex for compablility reason.
15101510
//
15111511
if( startIndex != -1 && startIndex != 0) {
1512-
ThrowArgumenStartIndexOutOfRange();
1512+
ThrowArgumentStartIndexOutOfRange();
15131513
}
15141514

15151515
// only 0 is a valid value for count if array is empty
15161516
if( count != 0) {
1517-
ThrowArgumenCountOutOfRange();
1517+
ThrowArgumentCountOutOfRange();
15181518
}
15191519
return -1;
15201520
}
15211521

15221522
// Make sure we're not out of range
15231523
if ( startIndex < 0 || startIndex >= array.Length) {
1524-
ThrowArgumenStartIndexOutOfRange();
1524+
ThrowArgumentStartIndexOutOfRange();
15251525
}
15261526

15271527
// 2nd have of this also catches when startIndex == MAXINT, so MAXINT - 0 + 1 == -1, which is < 0.
15281528
if (count < 0 || startIndex - count + 1 < 0) {
1529-
ThrowArgumenCountOutOfRange();
1529+
ThrowArgumentCountOutOfRange();
15301530
}
15311531

15321532
return EqualityComparer<T>.Default.LastIndexOf(array, value, startIndex, count);
@@ -2648,12 +2648,12 @@ private static void ThrowElementTypeNullException()
26482648
throw new ArgumentNullException("elementType");
26492649
}
26502650

2651-
private static void ThrowArgumenCountOutOfRange()
2651+
private static void ThrowArgumentCountOutOfRange()
26522652
{
26532653
throw new ArgumentOutOfRangeException("count", Environment.GetResourceString("ArgumentOutOfRange_Count"));
26542654
}
26552655

2656-
private static void ThrowArgumenStartIndexOutOfRange()
2656+
private static void ThrowArgumentStartIndexOutOfRange()
26572657
{
26582658
throw new ArgumentOutOfRangeException("startIndex", Environment.GetResourceString("ArgumentOutOfRange_Index"));
26592659
}

0 commit comments

Comments
 (0)