PropertyDescriptorCollection.Sort メソッド
定義
重要
一部の情報は、リリース前に大きく変更される可能性があるプレリリースされた製品に関するものです。 Microsoft は、ここに記載されている情報について、明示または黙示を問わず、一切保証しません。
このコレクションのメンバーを並べ替えます。
オーバーロード
| 名前 | 説明 |
|---|---|
| Sort() |
このコレクションの既定の並べ替え (通常はアルファベット順) を使用して、このコレクションのメンバーを並べ替えます。 |
| Sort(IComparer) |
指定した IComparerを使用して、このコレクションのメンバーを並べ替えます。 |
| Sort(String[]) |
このコレクションのメンバーを並べ替えます。 指定した順序が最初に適用され、その後にこのコレクションの既定の並べ替えが適用されます。通常はアルファベット順です。 |
| Sort(String[], IComparer) |
このコレクションのメンバーを並べ替えます。 指定した順序が最初に適用され、次に指定した IComparerを使用した並べ替えが適用されます。 |
Sort()
このコレクションの既定の並べ替え (通常はアルファベット順) を使用して、このコレクションのメンバーを並べ替えます。
public:
virtual System::ComponentModel::PropertyDescriptorCollection ^ Sort();
public virtual System.ComponentModel.PropertyDescriptorCollection Sort();
abstract member Sort : unit -> System.ComponentModel.PropertyDescriptorCollection
override this.Sort : unit -> System.ComponentModel.PropertyDescriptorCollection
Public Overridable Function Sort () As PropertyDescriptorCollection
返品
並べ替えられたPropertyDescriptorCollection オブジェクトを含む新しいPropertyDescriptor。
適用対象
Sort(IComparer)
指定した IComparerを使用して、このコレクションのメンバーを並べ替えます。
public:
virtual System::ComponentModel::PropertyDescriptorCollection ^ Sort(System::Collections::IComparer ^ comparer);
public virtual System.ComponentModel.PropertyDescriptorCollection Sort(System.Collections.IComparer? comparer);
public virtual System.ComponentModel.PropertyDescriptorCollection Sort(System.Collections.IComparer comparer);
abstract member Sort : System.Collections.IComparer -> System.ComponentModel.PropertyDescriptorCollection
override this.Sort : System.Collections.IComparer -> System.ComponentModel.PropertyDescriptorCollection
Public Overridable Function Sort (comparer As IComparer) As PropertyDescriptorCollection
パラメーター
- comparer
- IComparer
このコレクション内の PropertyDescriptor オブジェクトの並べ替えに使用する比較子。
返品
並べ替えられたPropertyDescriptorCollection オブジェクトを含む新しいPropertyDescriptor。
こちらもご覧ください
適用対象
Sort(String[])
このコレクションのメンバーを並べ替えます。 指定した順序が最初に適用され、その後にこのコレクションの既定の並べ替えが適用されます。通常はアルファベット順です。
public:
virtual System::ComponentModel::PropertyDescriptorCollection ^ Sort(cli::array <System::String ^> ^ names);
public virtual System.ComponentModel.PropertyDescriptorCollection Sort(string[]? names);
public virtual System.ComponentModel.PropertyDescriptorCollection Sort(string[] names);
abstract member Sort : string[] -> System.ComponentModel.PropertyDescriptorCollection
override this.Sort : string[] -> System.ComponentModel.PropertyDescriptorCollection
Public Overridable Function Sort (names As String()) As PropertyDescriptorCollection
パラメーター
- names
- String[]
このコレクション内の PropertyDescriptor オブジェクトを並べ替える順序を記述する文字列の配列。
返品
並べ替えられたPropertyDescriptorCollection オブジェクトを含む新しいPropertyDescriptor。
例
次のコード例では、 Sort メソッドの並べ替え順序を定義します。
PropertyDescriptorCollectionに名前がPropertyDescriptor、A、B、Cの 4 つのD オブジェクトが含まれている場合、myNewCollのプロパティは、D、B、A、およびCの順序で並べ替えられます。
array<String^>^ temp0 = {"D","B"};
myNewColl = this->Sort( temp0 );
myNewColl = Sort(["D", "B"]);
myNewColl = Me.Sort(New String() {"D", "B"})
こちらもご覧ください
適用対象
Sort(String[], IComparer)
このコレクションのメンバーを並べ替えます。 指定した順序が最初に適用され、次に指定した IComparerを使用した並べ替えが適用されます。
public:
virtual System::ComponentModel::PropertyDescriptorCollection ^ Sort(cli::array <System::String ^> ^ names, System::Collections::IComparer ^ comparer);
public virtual System.ComponentModel.PropertyDescriptorCollection Sort(string[]? names, System.Collections.IComparer? comparer);
public virtual System.ComponentModel.PropertyDescriptorCollection Sort(string[] names, System.Collections.IComparer comparer);
abstract member Sort : string[] * System.Collections.IComparer -> System.ComponentModel.PropertyDescriptorCollection
override this.Sort : string[] * System.Collections.IComparer -> System.ComponentModel.PropertyDescriptorCollection
Public Overridable Function Sort (names As String(), comparer As IComparer) As PropertyDescriptorCollection
パラメーター
- names
- String[]
このコレクション内の PropertyDescriptor オブジェクトを並べ替える順序を記述する文字列の配列。
- comparer
- IComparer
このコレクション内の PropertyDescriptor オブジェクトの並べ替えに使用する比較子。
返品
並べ替えられたPropertyDescriptorCollection オブジェクトを含む新しいPropertyDescriptor。
例
次のコード例では、 Sort メソッドの並べ替え順序を定義します。
PropertyDescriptorCollectionに名前がPropertyDescriptor、A、B、Cの 4 つのD オブジェクトが含まれている場合、myNewCollのプロパティは、D、B、A、およびCの順序で並べ替えられます。
array<String^>^ temp0 = {"D","B"};
myNewColl = this->Sort( temp0 );
myNewColl = Sort(["D", "B"]);
myNewColl = Me.Sort(New String() {"D", "B"})