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

◆ CompareTo() [1/2]

int IStructuralComparable. System.Array.CompareTo ( object other,
IComparer comparer )
inlineprivate

Definition at line 1254 of file Array.cs.

1255 {
1256 if (other == null)
1257 {
1258 return 1;
1259 }
1261 if (array == null || Length != array.Length)
1262 {
1263 ThrowHelper.ThrowArgumentException(ExceptionResource.ArgumentException_OtherNotArrayOfCorrectLength, ExceptionArgument.other);
1264 }
1265 int i = 0;
1266 int num = 0;
1267 for (; i < array.Length; i++)
1268 {
1269 if (num != 0)
1270 {
1271 break;
1272 }
1273 object value = GetValue(i);
1274 object value2 = array.GetValue(i);
1275 num = comparer.Compare(value, value2);
1276 }
1277 return num;
1278 }
object? GetValue(params int[] indices)
Definition Array.cs:980
int Length
Definition Array.cs:430

References System.Array.Array(), System.array, System.comparer, System.Array.GetValue(), System.Array.Length, System.other, System.ThrowHelper.ThrowArgumentException(), and System.value.