EventDescriptorCollection.Sort 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
分類這個 EventDescriptorCollection成員。
多載
| 名稱 | Description |
|---|---|
| Sort(String[], IComparer) |
給 EventDescriptorCollection定指定的排序順序和 IComparer。 |
| Sort(String[]) |
在指定排序順序下,對此 EventDescriptorCollection成員進行排序。 |
| Sort() |
使用此集合的預設排序,通常是按字母順序排序,對此 EventDescriptorCollection成員進行排序。 |
| Sort(IComparer) |
利用指定的 IComparer來排序 的成員EventDescriptorCollection。 |
Sort(String[], IComparer)
給 EventDescriptorCollection定指定的排序順序和 IComparer。
public:
virtual System::ComponentModel::EventDescriptorCollection ^ Sort(cli::array <System::String ^> ^ names, System::Collections::IComparer ^ comparer);
public virtual System.ComponentModel.EventDescriptorCollection Sort(string[] names, System.Collections.IComparer comparer);
abstract member Sort : string[] * System.Collections.IComparer -> System.ComponentModel.EventDescriptorCollection
override this.Sort : string[] * System.Collections.IComparer -> System.ComponentModel.EventDescriptorCollection
Public Overridable Function Sort (names As String(), comparer As IComparer) As EventDescriptorCollection
參數
- names
- String[]
一個描述集合中物件排序順序 EventDescriptor 的字串陣列。
- comparer
- IComparer
用來 IComparer 排序 EventDescriptor 這個集合中的物件。
傳回
範例
以下程式碼範例定義了該 Sort 方法的排序順序。 若包含四個名稱分別為 、 B、 C、 D的物件,則 的myNewColl性質將依序D排序為 、 B、 CA、 和 。AEventDescriptorEventDescriptorCollection
array<String^>^ temp0 = {"D","B"};
myNewColl = this->Sort( temp0 );
myNewColl = Sort(["D", "B"]);
myNewColl = Me.Sort(New String() {"D", "B"})
備註
先套用指定的排序順序,接著使用指定的 IComparer排序。
備註
HostProtectionAttribute套用於此類別的屬性具有以下Resources屬性值: Synchronization。 這 HostProtectionAttribute 不會影響桌面應用程式(通常透過雙擊圖示、輸入指令或在瀏覽器輸入網址來啟動)。 欲了解更多資訊,請參閱 HostProtectionAttribute 類別或 SQL Server 程式設計與主機保護屬性。
另請參閱
適用於
Sort(String[])
在指定排序順序下,對此 EventDescriptorCollection成員進行排序。
public:
virtual System::ComponentModel::EventDescriptorCollection ^ Sort(cli::array <System::String ^> ^ names);
public virtual System.ComponentModel.EventDescriptorCollection Sort(string[] names);
abstract member Sort : string[] -> System.ComponentModel.EventDescriptorCollection
override this.Sort : string[] -> System.ComponentModel.EventDescriptorCollection
Public Overridable Function Sort (names As String()) As EventDescriptorCollection
參數
- names
- String[]
一個描述集合中物件排序順序 EventDescriptor 的字串陣列。
傳回
範例
以下程式碼範例定義了該 Sort 方法的排序順序。 若包含四個名稱分別為 、 B、 C、 D的物件,則 的myNewColl性質將依序D排序為 、 B、 CA、 和 。AEventDescriptorEventDescriptorCollection
array<String^>^ temp0 = {"D","B"};
myNewColl = this->Sort( temp0 );
myNewColl = Sort(["D", "B"]);
myNewColl = Me.Sort(New String() {"D", "B"})
備註
先套用指定的排序,接著是該集合的預設排序,通常是按字母順序排列。
備註
HostProtectionAttribute套用於此類別的屬性具有以下Resources屬性值: Synchronization。 這 HostProtectionAttribute 不會影響桌面應用程式(通常透過雙擊圖示、輸入指令或在瀏覽器輸入網址來啟動)。 欲了解更多資訊,請參閱 HostProtectionAttribute 類別或 SQL Server 程式設計與主機保護屬性。
另請參閱
適用於
Sort()
使用此集合的預設排序,通常是按字母順序排序,對此 EventDescriptorCollection成員進行排序。
public:
virtual System::ComponentModel::EventDescriptorCollection ^ Sort();
public virtual System.ComponentModel.EventDescriptorCollection Sort();
abstract member Sort : unit -> System.ComponentModel.EventDescriptorCollection
override this.Sort : unit -> System.ComponentModel.EventDescriptorCollection
Public Overridable Function Sort () As EventDescriptorCollection
傳回
範例
以下程式碼範例定義了該 Sort 方法的排序順序。 若包含四個名稱分別為 、 B、 C、 D的物件,則 的myNewColl性質將依序D排序為 、 B、 CA、 和 。AEventDescriptorEventDescriptorCollection
array<String^>^ temp0 = {"D","B"};
myNewColl = this->Sort( temp0 );
myNewColl = Sort(["D", "B"]);
myNewColl = Me.Sort(New String() {"D", "B"})
備註
備註
HostProtectionAttribute套用於此類別的屬性具有以下Resources屬性值: Synchronization。 這 HostProtectionAttribute 不會影響桌面應用程式(通常透過雙擊圖示、輸入指令或在瀏覽器輸入網址來啟動)。 欲了解更多資訊,請參閱 HostProtectionAttribute 類別或 SQL Server 程式設計與主機保護屬性。
適用於
Sort(IComparer)
利用指定的 IComparer來排序 的成員EventDescriptorCollection。
public:
virtual System::ComponentModel::EventDescriptorCollection ^ Sort(System::Collections::IComparer ^ comparer);
public virtual System.ComponentModel.EventDescriptorCollection Sort(System.Collections.IComparer comparer);
abstract member Sort : System.Collections.IComparer -> System.ComponentModel.EventDescriptorCollection
override this.Sort : System.Collections.IComparer -> System.ComponentModel.EventDescriptorCollection
Public Overridable Function Sort (comparer As IComparer) As EventDescriptorCollection
參數
- comparer
- IComparer
用來 IComparer 排序 EventDescriptor 這個集合中的物件。
傳回
範例
以下程式碼範例定義了該 Sort 方法的排序順序。 若包含四個名稱分別為 、 B、 C、 D的物件,則 的myNewColl性質將依序D排序為 、 B、 CA、 和 。AEventDescriptorEventDescriptorCollection
array<String^>^ temp0 = {"D","B"};
myNewColl = this->Sort( temp0 );
myNewColl = Sort(["D", "B"]);
myNewColl = Me.Sort(New String() {"D", "B"})
備註
先套用指定的 IComparer 排序,接著是該集合的預設排序,通常是按字母順序排列。
備註
HostProtectionAttribute套用於此類別的屬性具有以下Resources屬性值: Synchronization。 這 HostProtectionAttribute 不會影響桌面應用程式(通常透過雙擊圖示、輸入指令或在瀏覽器輸入網址來啟動)。 欲了解更多資訊,請參閱 HostProtectionAttribute 類別或 SQL Server 程式設計與主機保護屬性。