Early Preview
This is currently very much a preview. Please feel free to try things out,
but don't be upset if anything is not yet working. Feedback is welcome over on our
GitHub Dicussions page.
class System.​ComponentModel.​PropertyDescriptorCollection
Assembly: System.ComponentModel.TypeConverter
Inheritance: object → PropertyDescriptorCollection
Implemented Interfaces
- Collections.​IDictionary (Inherits: ICollectionIEnumerable)
- Collections.​IList (Inherits: ICollectionIEnumerable)
Represents a collection of <see cref="T:System.ComponentModel.PropertyDescriptor" /> objects.
Fields and Constants
public static readonly
PropertyDescriptorCollection
Empty
Specifies an empty collection that you can use instead of creating a new one with no items. This <see langword="static" /> field is read-only.
Properties
public
int
Count
Gets the number of property descriptors in the collection.
public
PropertyDescriptor
Item
public
PropertyDescriptor
Item
Methods
public
int
Add​(PropertyDescriptor value)
Adds the specified <see cref="T:System.ComponentModel.PropertyDescriptor" /> to the collection.
Returns The index of the <see cref="T:System.ComponentModel.PropertyDescriptor" /> that was added to the collection.
value
The <see cref="T:System.ComponentModel.PropertyDescriptor" /> to add to the collection.
public
void
Clear​()
Removes all <see cref="T:System.ComponentModel.PropertyDescriptor" /> objects from the collection.
public
bool
Contains​(PropertyDescriptor value)
Returns whether the collection contains the given <see cref="T:System.ComponentModel.PropertyDescriptor" /> .
Returns <see langword="true" /> if the collection contains the given <see cref="T:System.ComponentModel.PropertyDescriptor" /> ; otherwise, <see langword="false" /> .
value
The <see cref="T:System.ComponentModel.PropertyDescriptor" /> to find in the collection.
public
void
CopyTo​(Array array,
int index)
Copies the entire collection to an array, starting at the specified index number.
array
An array of <see cref="T:System.ComponentModel.PropertyDescriptor" /> objects to copy elements of the collection to.
index
The index of the <paramref name="array" /> parameter at which copying begins.
public
PropertyDescriptor
Find​(string name,
bool ignoreCase)
Returns the <see cref="T:System.ComponentModel.PropertyDescriptor" /> with the specified name, using a Boolean to indicate whether to ignore case.
Returns A <see cref="T:System.ComponentModel.PropertyDescriptor" /> with the specified name, or <see langword="null" /> if the property does not exist.
name
The name of the <see cref="T:System.ComponentModel.PropertyDescriptor" /> to return from the collection.
ignoreCase
<see langword="true" /> if you want to ignore the case of the property name; otherwise, <see langword="false" /> .
GetEnumerator​()
Returns an enumerator for this class.
Returns An enumerator of type <see cref="T:System.Collections.IEnumerator" /> .
public
int
IndexOf​(PropertyDescriptor value)
Returns the index of the given <see cref="T:System.ComponentModel.PropertyDescriptor" /> .
Returns The index of the given <see cref="T:System.ComponentModel.PropertyDescriptor" /> .
value
The <see cref="T:System.ComponentModel.PropertyDescriptor" /> to return the index of.
public
void
Insert​(int index,
PropertyDescriptor value)
Adds the <see cref="T:System.ComponentModel.PropertyDescriptor" /> to the collection at the specified index number.
index
The index at which to add the <paramref name="value" /> parameter to the collection.
value
The <see cref="T:System.ComponentModel.PropertyDescriptor" /> to add to the collection.
protected
void
InternalSort​(Collections.​IComparer sorter)
Sorts the members of this collection, using the specified <see cref="T:System.Collections.IComparer" /> .
sorter
A comparer to use to sort the <see cref="T:System.ComponentModel.PropertyDescriptor" /> objects in this collection.
protected
void
InternalSort​(string[] names)
Sorts the members of this collection. The specified order is applied first, followed by the default sort for this collection, which is usually alphabetical.
names
An array of strings describing the order in which to sort the <see cref="T:System.ComponentModel.PropertyDescriptor" /> objects in this collection.
public
void
Remove​(PropertyDescriptor value)
Removes the specified <see cref="T:System.ComponentModel.PropertyDescriptor" /> from the collection.
value
The <see cref="T:System.ComponentModel.PropertyDescriptor" /> to remove from the collection.
public
void
RemoveAt​(int index)
Removes the <see cref="T:System.ComponentModel.PropertyDescriptor" /> at the specified index from the collection.
index
The index of the <see cref="T:System.ComponentModel.PropertyDescriptor" /> to remove from the collection.
public
PropertyDescriptorCollection
Sort​()
Sorts the members of this collection, using the default sort for this collection, which is usually alphabetical.
Returns A new <see cref="T:System.ComponentModel.PropertyDescriptorCollection" /> that contains the sorted <see cref="T:System.ComponentModel.PropertyDescriptor" /> objects.
public
PropertyDescriptorCollection
Sort​(Collections.​IComparer? comparer)
Sorts the members of this collection, using the specified <see cref="T:System.Collections.IComparer" /> .
Returns A new <see cref="T:System.ComponentModel.PropertyDescriptorCollection" /> that contains the sorted <see cref="T:System.ComponentModel.PropertyDescriptor" /> objects.
comparer
A comparer to use to sort the <see cref="T:System.ComponentModel.PropertyDescriptor" /> objects in this collection.
public
PropertyDescriptorCollection
Sort​(string[] names)
Sorts the members of this collection. The specified order is applied first, followed by the default sort for this collection, which is usually alphabetical.
Returns A new <see cref="T:System.ComponentModel.PropertyDescriptorCollection" /> that contains the sorted <see cref="T:System.ComponentModel.PropertyDescriptor" /> objects.
names
An array of strings describing the order in which to sort the <see cref="T:System.ComponentModel.PropertyDescriptor" /> objects in this collection.
public
PropertyDescriptorCollection
Sort​(string[] names,
Collections.​IComparer? comparer)
Sorts the members of this collection. The specified order is applied first, followed by the sort using the specified <see cref="T:System.Collections.IComparer" /> .
Returns A new <see cref="T:System.ComponentModel.PropertyDescriptorCollection" /> that contains the sorted <see cref="T:System.ComponentModel.PropertyDescriptor" /> objects.
names
An array of strings describing the order in which to sort the <see cref="T:System.ComponentModel.PropertyDescriptor" /> objects in this collection.
comparer
A comparer to use to sort the <see cref="T:System.ComponentModel.PropertyDescriptor" /> objects in this collection.
public
bool
Equals​(object obj)
Inherited from object
protected
void
Finalize​()
Inherited from object
public
int
GetHashCode​()
Inherited from object
protected
object
MemberwiseClone​()
Inherited from object
public
string
ToString​()
Inherited from object