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

◆ Compare() [1/2]

int IComparer. System.Collections.Generic.Comparer< T >.Compare ( object x,
object y )
inlineprivate

Definition at line 28 of file Comparer.cs.

29 {
30 if (x == null)
31 {
32 if (y != null)
33 {
34 return -1;
35 }
36 return 0;
37 }
38 if (y == null)
39 {
40 return 1;
41 }
42 if (x is T && y is T)
43 {
44 return Compare((T)x, (T)y);
45 }
46 ThrowHelper.ThrowArgumentException(ExceptionResource.Argument_InvalidArgumentForComparison);
47 return 0;
48 }

References System.Collections.Generic.Comparer< T >.Compare(), and System.ThrowHelper.ThrowArgumentException().