ComboBox.ObjectCollection.IComparer<ComboBox.ObjectCollection>.Compare 方法

定义

比较两个对象并返回一个值,该值指示一个对象小于、等于还是大于另一个对象。

 virtual int System.Collections.Generic.IComparer<System.Windows.Forms.ComboBox.ObjectCollection.Entry>.Compare(System::Windows::Forms::ComboBox::ObjectCollection::Entry ^ entry1, System::Windows::Forms::ComboBox::ObjectCollection::Entry ^ entry2) = System::Collections::Generic::IComparer<System::Windows::Forms::ComboBox::ObjectCollection::Entry ^>::Compare;
int IComparer<ComboBox.ObjectCollection.Entry>.Compare (System.Windows.Forms.ComboBox.ObjectCollection.Entry entry1, System.Windows.Forms.ComboBox.ObjectCollection.Entry entry2);
abstract member System.Collections.Generic.IComparer<System.Windows.Forms.ComboBox.ObjectCollection.Entry>.Compare : System.Windows.Forms.ComboBox.ObjectCollection.Entry * System.Windows.Forms.ComboBox.ObjectCollection.Entry -> int
override this.System.Collections.Generic.IComparer<System.Windows.Forms.ComboBox.ObjectCollection.Entry>.Compare : System.Windows.Forms.ComboBox.ObjectCollection.Entry * System.Windows.Forms.ComboBox.ObjectCollection.Entry -> int
Function Compare (entry1 As ComboBox.ObjectCollection.Entry, entry2 As ComboBox.ObjectCollection.Entry) As Integer Implements IComparer(Of ComboBox.ObjectCollection.Entry).Compare

参数

entry1
System.Windows.Forms.ComboBox.ObjectCollection.Entry

要比较的条目

entry2
System.Windows.Forms.ComboBox.ObjectCollection.Entry

要比较的条目。

返回

Int32

一个有符号整数,指示 xy 的相对值,如下表所示。

含义
小于零 x 小于 y
x 等于 y
大于零 x 大于 y

实现

适用于