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

◆ CompareTo() [2/4]

int System.Boolean.CompareTo ( object? obj)
inline

Implements System.IComparable< in T >.

Definition at line 83 of file Boolean.cs.

84 {
85 if (obj == null)
86 {
87 return 1;
88 }
89 if (!(obj is bool))
90 {
91 throw new ArgumentException(SR.Arg_MustBeBoolean);
92 }
93 if (this == (bool)obj)
94 {
95 return 0;
96 }
97 if (!this)
98 {
99 return -1;
100 }
101 return 1;
102 }

References System.SR.Arg_MustBeBoolean, and System.obj.