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.​EventDescriptorCollection
Assembly: System.ComponentModel.TypeConverter
Inheritance: object → EventDescriptorCollection
Implemented Interfaces
Represents a collection of <see cref="T:System.ComponentModel.EventDescriptor" /> objects.
Fields and Constants
public static readonly
EventDescriptorCollection
Empty
Specifies an empty collection to use, rather than creating a new one with no items. This <see langword="static" /> field is read-only.
Properties
public
int
Count
Gets the number of event descriptors in the collection.
public
EventDescriptor
Item
public
EventDescriptor
Item
Methods
public
int
Add​(EventDescriptor value)
Adds an <see cref="T:System.ComponentModel.EventDescriptor" /> to the end of the collection.
Returns The position of the <see cref="T:System.ComponentModel.EventDescriptor" /> within the collection.
value
An <see cref="T:System.ComponentModel.EventDescriptor" /> to add to the collection.
public
void
Clear​()
Removes all objects from the collection.
public
bool
Contains​(EventDescriptor value)
Returns whether the collection contains the given <see cref="T:System.ComponentModel.EventDescriptor" /> .
Returns <see langword="true" /> if the collection contains the <paramref name="value" /> parameter given; otherwise, <see langword="false" /> .
value
The <see cref="T:System.ComponentModel.EventDescriptor" /> to find within the collection.
public
EventDescriptor
Find​(string name,
bool ignoreCase)
Gets the description of the event with the specified name in the collection.
Returns The <see cref="T:System.ComponentModel.EventDescriptor" /> with the specified name, or <see langword="null" /> if the event does not exist.
name
The name of the event to get from the collection.
ignoreCase
<see langword="true" /> if you want to ignore the case of the event; otherwise, <see langword="false" /> .
GetEnumerator​()
Gets an enumerator for this <see cref="T:System.ComponentModel.EventDescriptorCollection" /> .
Returns An enumerator that implements <see cref="T:System.Collections.IEnumerator" /> .
public
int
IndexOf​(EventDescriptor value)
Returns the index of the given <see cref="T:System.ComponentModel.EventDescriptor" /> .
Returns The index of the given <see cref="T:System.ComponentModel.EventDescriptor" /> within the collection.
value
The <see cref="T:System.ComponentModel.EventDescriptor" /> to find within the collection.
public
void
Insert​(int index,
EventDescriptor value)
Inserts an <see cref="T:System.ComponentModel.EventDescriptor" /> to the collection at a specified index.
index
The index within the collection in which to insert the <paramref name="value" /> parameter.
value
An <see cref="T:System.ComponentModel.EventDescriptor" /> to insert into the collection.
protected
void
InternalSort​(Collections.​IComparer sorter)
Sorts the members of this <see cref="T:System.ComponentModel.EventDescriptorCollection" /> , using the specified <see cref="T:System.Collections.IComparer" /> .
sorter
A comparer to use to sort the <see cref="T:System.ComponentModel.EventDescriptor" /> objects in this collection.
protected
void
InternalSort​(string[] names)
Sorts the members of this <see cref="T:System.ComponentModel.EventDescriptorCollection" /> . 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.EventDescriptor" /> objects in this collection.
public
void
Remove​(EventDescriptor value)
Removes the specified <see cref="T:System.ComponentModel.EventDescriptor" /> from the collection.
value
The <see cref="T:System.ComponentModel.EventDescriptor" /> to remove from the collection.
public
void
RemoveAt​(int index)
Removes the <see cref="T:System.ComponentModel.EventDescriptor" /> at the specified index from the collection.
index
The index of the <see cref="T:System.ComponentModel.EventDescriptor" /> to remove.
public
EventDescriptorCollection
Sort​()
Sorts the members of this <see cref="T:System.ComponentModel.EventDescriptorCollection" /> , using the default sort for this collection, which is usually alphabetical.
Returns The new <see cref="T:System.ComponentModel.EventDescriptorCollection" /> .
public
EventDescriptorCollection
Sort​(Collections.​IComparer comparer)
Sorts the members of this <see cref="T:System.ComponentModel.EventDescriptorCollection" /> , using the specified <see cref="T:System.Collections.IComparer" /> .
Returns The new <see cref="T:System.ComponentModel.EventDescriptorCollection" /> .
comparer
An <see cref="T:System.Collections.IComparer" /> to use to sort the <see cref="T:System.ComponentModel.EventDescriptor" /> objects in this collection.
public
EventDescriptorCollection
Sort​(string[] names)
Sorts the members of this <see cref="T:System.ComponentModel.EventDescriptorCollection" /> , given a specified sort order.
Returns The new <see cref="T:System.ComponentModel.EventDescriptorCollection" /> .
names
An array of strings describing the order in which to sort the <see cref="T:System.ComponentModel.EventDescriptor" /> objects in the collection.
public
EventDescriptorCollection
Sort​(string[] names,
Collections.​IComparer comparer)
Sorts the members of this <see cref="T:System.ComponentModel.EventDescriptorCollection" /> , given a specified sort order and an <see cref="T:System.Collections.IComparer" /> .
Returns The new <see cref="T:System.ComponentModel.EventDescriptorCollection" /> .
names
An array of strings describing the order in which to sort the <see cref="T:System.ComponentModel.EventDescriptor" /> objects in the collection.
comparer
An <see cref="T:System.Collections.IComparer" /> to use to sort the <see cref="T:System.ComponentModel.EventDescriptor" /> 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