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

◆ CompareTo() [1/2]

int IStructuralComparable. System.Collections.Immutable.ImmutableArray< T >.CompareTo ( object other,
IComparer comparer )
inline

Definition at line 1522 of file ImmutableArray.cs.

1523 {
1526 if (array == null && other is IImmutableArray immutableArray2)
1527 {
1528 array = immutableArray2.Array;
1529 if (immutableArray.array == null && array == null)
1530 {
1531 return 0;
1532 }
1533 if ((immutableArray.array == null) ^ (array == null))
1534 {
1536 }
1537 }
1538 if (array != null)
1539 {
1540 IStructuralComparable structuralComparable = immutableArray.array;
1541 if (structuralComparable == null)
1542 {
1544 }
1545 return structuralComparable.CompareTo(array, comparer);
1546 }
1547 throw new ArgumentException(System.SR.ArrayLengthsNotEqual, "other");
1548 }
static string ArrayLengthsNotEqual
Definition SR.cs:18
static string ArrayInitializedStateNotEqual
Definition SR.cs:16
Definition SR.cs:7

References System.Collections.Immutable.ImmutableArray< T >.array, System.Collections.Immutable.ImmutableArray< T >.Array, System.SR.ArrayInitializedStateNotEqual, System.SR.ArrayLengthsNotEqual, System.comparer, and System.other.