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

◆ LastIndexOf() [1/2]

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

Definition at line 36 of file NullableEqualityComparer.cs.

37 {
38 int num = startIndex - count + 1;
39 if (!value.HasValue)
40 {
41 for (int num2 = startIndex; num2 >= num; num2--)
42 {
43 if (!array[num2].HasValue)
44 {
45 return num2;
46 }
47 }
48 }
49 else
50 {
51 for (int num3 = startIndex; num3 >= num; num3--)
52 {
53 if (array[num3].HasValue && array[num3].value.Equals(value.value))
54 {
55 return num3;
56 }
57 }
58 }
59 return -1;
60 }

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