PropertyDescriptorCollection.Sort Metódus
Definíció
Fontos
Egyes információk olyan, kiadás előtti termékekre vonatkoznak, amelyek a kiadásig még jelentősen módosulhatnak. A Microsoft nem vállal kifejezett vagy törvényi garanciát az itt megjelenő információért.
Rendezi a gyűjtemény tagjait.
Túlterhelések
| Name | Description |
|---|---|
| Sort() |
A gyűjtemény tagjait a gyűjtemény alapértelmezett rendezési módjával rendezi, amely általában betűrendes. |
| Sort(IComparer) |
A gyűjtemény tagjait a megadott IComparermódon rendezi. |
| Sort(String[]) |
Rendezi a gyűjtemény tagjait. Először a megadott sorrendet alkalmazza a rendszer, majd az alapértelmezett rendezést a gyűjteményhez, amely általában betűrendes. |
| Sort(String[], IComparer) |
Rendezi a gyűjtemény tagjait. Először a megadott sorrendet alkalmazza a rendszer, majd a megadott IComparersorrendet követve. |
Sort()
A gyűjtemény tagjait a gyűjtemény alapértelmezett rendezési módjával rendezi, amely általában betűrendes.
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
Válaszok
A rendezett PropertyDescriptorCollection objektumokat tartalmazó újPropertyDescriptor.
A következőre érvényes:
Sort(IComparer)
A gyűjtemény tagjait a megadott IComparermódon rendezi.
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
Paraméterek
- comparer
- IComparer
A gyűjtemény objektumainak rendezésére PropertyDescriptor használható összehasonlító.
Válaszok
A rendezett PropertyDescriptorCollection objektumokat tartalmazó újPropertyDescriptor.
Lásd még
A következőre érvényes:
Sort(String[])
Rendezi a gyűjtemény tagjait. Először a megadott sorrendet alkalmazza a rendszer, majd az alapértelmezett rendezést a gyűjteményhez, amely általában betűrendes.
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
Paraméterek
- names
- String[]
Sztringek tömbje, amelyek a gyűjtemény objektumainak rendezésének PropertyDescriptor sorrendjét írják le.
Válaszok
A rendezett PropertyDescriptorCollection objektumokat tartalmazó újPropertyDescriptor.
Példák
Az alábbi példakód a metódus rendezési sorrendjét Sort határozza meg. Ha a PropertyDescriptorCollection lista négy PropertyDescriptor objektumot tartalmaz, amelyek neve A, BCés D, tulajdonsága myNewColl rendezve lesz a sorrendben D, BAés C.
array<String^>^ temp0 = {"D","B"};
myNewColl = this->Sort( temp0 );
myNewColl = Sort(["D", "B"]);
myNewColl = Me.Sort(New String() {"D", "B"})
Lásd még
A következőre érvényes:
Sort(String[], IComparer)
Rendezi a gyűjtemény tagjait. Először a megadott sorrendet alkalmazza a rendszer, majd a megadott IComparersorrendet követve.
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
Paraméterek
- names
- String[]
Sztringek tömbje, amelyek a gyűjtemény objektumainak rendezésének PropertyDescriptor sorrendjét írják le.
- comparer
- IComparer
A gyűjtemény objektumainak rendezésére PropertyDescriptor használható összehasonlító.
Válaszok
A rendezett PropertyDescriptorCollection objektumokat tartalmazó újPropertyDescriptor.
Példák
Az alábbi példakód a metódus rendezési sorrendjét Sort határozza meg. Ha a PropertyDescriptorCollection lista négy PropertyDescriptor objektumot tartalmaz, amelyek neve A, BCés D, tulajdonsága myNewColl rendezve lesz a sorrendben D, BAés C.
array<String^>^ temp0 = {"D","B"};
myNewColl = this->Sort( temp0 );
myNewColl = Sort(["D", "B"]);
myNewColl = Me.Sort(New String() {"D", "B"})