Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ IndexOf() [1/2]

override int System.Collections.Generic.NullableEqualityComparer< T >.IndexOf ( T?[] array,
T? value,
int startIndex,
int count )
inlinepackage

Definition at line 10 of file NullableEqualityComparer.cs.

11 {
12 int num = startIndex + count;
13 if (!value.HasValue)
14 {
15 for (int i = startIndex; i < num; i++)
16 {
17 if (!array[i].HasValue)
18 {
19 return i;
20 }
21 }
22 }
23 else
24 {
25 for (int j = startIndex; j < num; j++)
26 {
27 if (array[j].HasValue && array[j].value.Equals(value.value))
28 {
29 return j;
30 }
31 }
32 }
33 return -1;
34 }

References System.array, System.count, System.startIndex, and System.value.