PropertyDescriptorCollection.Sort Metode
Definisi
Penting
Beberapa informasi terkait produk prarilis yang dapat diubah secara signifikan sebelum dirilis. Microsoft tidak memberikan jaminan, tersirat maupun tersurat, sehubungan dengan informasi yang diberikan di sini.
Mengurutkan anggota koleksi ini.
Overload
| Nama | Deskripsi |
|---|---|
| Sort() |
Mengurutkan anggota koleksi ini, menggunakan pengurutan default untuk koleksi ini, yang biasanya alfabet. |
| Sort(IComparer) |
Mengurutkan anggota koleksi ini, menggunakan yang ditentukan IComparer. |
| Sort(String[]) |
Mengurutkan anggota koleksi ini. Urutan yang ditentukan diterapkan terlebih dahulu, diikuti dengan pengurutan default untuk koleksi ini, yang biasanya alfabet. |
| Sort(String[], IComparer) |
Mengurutkan anggota koleksi ini. Urutan yang ditentukan diterapkan terlebih dahulu, diikuti dengan pengurutan IComparermenggunakan . |
Sort()
Mengurutkan anggota koleksi ini, menggunakan pengurutan default untuk koleksi ini, yang biasanya alfabet.
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
Mengembalikan
PropertyDescriptorCollection Baru yang berisi objek yang diurutkanPropertyDescriptor.
Berlaku untuk
Sort(IComparer)
Mengurutkan anggota koleksi ini, menggunakan yang ditentukan 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
Parameter
- comparer
- IComparer
Pembanding yang digunakan untuk mengurutkan PropertyDescriptor objek dalam koleksi ini.
Mengembalikan
PropertyDescriptorCollection Baru yang berisi objek yang diurutkanPropertyDescriptor.
Lihat juga
Berlaku untuk
Sort(String[])
Mengurutkan anggota koleksi ini. Urutan yang ditentukan diterapkan terlebih dahulu, diikuti dengan pengurutan default untuk koleksi ini, yang biasanya alfabet.
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
Parameter
- names
- String[]
Array string yang menjelaskan urutan untuk mengurutkan PropertyDescriptor objek dalam koleksi ini.
Mengembalikan
PropertyDescriptorCollection Baru yang berisi objek yang diurutkanPropertyDescriptor.
Contoh
Contoh kode berikut mendefinisikan urutan pengurutan untuk metode .Sort Jika PropertyDescriptorCollection berisi empat objek PropertyDescriptor dengan nama A, B, C, dan D, properti myNewColl akan diurutkan dalam urutan D, B, A, dan C.
array<String^>^ temp0 = {"D","B"};
myNewColl = this->Sort( temp0 );
myNewColl = Sort(["D", "B"]);
myNewColl = Me.Sort(New String() {"D", "B"})
Lihat juga
Berlaku untuk
Sort(String[], IComparer)
Mengurutkan anggota koleksi ini. Urutan yang ditentukan diterapkan terlebih dahulu, diikuti dengan pengurutan IComparermenggunakan .
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
Parameter
- names
- String[]
Array string yang menjelaskan urutan untuk mengurutkan PropertyDescriptor objek dalam koleksi ini.
- comparer
- IComparer
Pembanding yang digunakan untuk mengurutkan PropertyDescriptor objek dalam koleksi ini.
Mengembalikan
PropertyDescriptorCollection Baru yang berisi objek yang diurutkanPropertyDescriptor.
Contoh
Contoh kode berikut mendefinisikan urutan pengurutan untuk metode .Sort Jika PropertyDescriptorCollection berisi empat objek PropertyDescriptor dengan nama A, B, C, dan D, properti myNewColl akan diurutkan dalam urutan D, B, A, dan C.
array<String^>^ temp0 = {"D","B"};
myNewColl = this->Sort( temp0 );
myNewColl = Sort(["D", "B"]);
myNewColl = Me.Sort(New String() {"D", "B"})