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

◆ Compare()

override int System.Data.Common.ObjectStorage.Compare ( int recordNo1,
int recordNo2 )
inline

Definition at line 75 of file ObjectStorage.cs.

76 {
77 object obj = _values[recordNo1];
78 object obj2 = _values[recordNo2];
79 if (obj == obj2)
80 {
81 return 0;
82 }
83 if (obj == null)
84 {
85 return -1;
86 }
87 if (obj2 == null)
88 {
89 return 1;
90 }
91 if (obj is IComparable comparable)
92 {
93 try
94 {
95 return comparable.CompareTo(obj2);
96 }
97 catch (ArgumentException e)
98 {
99 ExceptionBuilder.TraceExceptionWithoutRethrow(e);
100 }
101 }
103 }
int CompareWithFamilies(object valueNo1, object valueNo2)

References System.Data.Common.ObjectStorage._values, System.comparable, System.Data.Common.ObjectStorage.CompareWithFamilies(), System.Xml.Dictionary, System.obj, and System.Data.ExceptionBuilder.TraceExceptionWithoutRethrow().