EnumerationCompareTo(Object) 方法

Compares the current instance with another object of the same type and returns an integer that indicates whether the current instance precedes, follows, or occurs in the same position in the sort order as the other object.

Definition

命名空间: Suresking.Utility
程序集: Suresking.Utility (在 Suresking.Utility.dll 中) 版本:1.3.22+a27276bb8ffde055e69ff608e98aafba279e1e99
C#
public int CompareTo(
	Object? other
)

参数

other  Object

[缺少 "M:Suresking.Utility.Enumeration.CompareTo(System.Object)" 的 <param name="other"/> 文档]

返回值

Int32
A value that indicates the relative order of the objects being compared. The return value has these meanings:
Value Meaning
Less than zero This instance precedes obj in the sort order.
Zero This instance occurs in the same position in the sort order as obj.
Greater than zero This instance follows obj in the sort order.

实现

IComparableCompareTo(Object)

异常

ArgumentExceptionobj is not the same type as this instance.

参见