NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

EventDescriptorCollection.All

Gets an array of descriptions of events.

[Visual Basic]
Overridable Public Property All As EventDescriptor ()
[C#]
public EventDescriptor[] All {virtual get; virtual set;}
[C++]
public: __property virtual EventDescriptor* get_All();
public: __property virtual void set_All(EventDescriptor*[]);
[JScript]
public function get All() : EventDescriptor[];
public function set All(EventDescriptor[]);

Property Value

An array of type EventDescriptor with descriptions of the events.

Exceptions

Exception Type Condition
NotSupportedException Setting the property.

Remarks

This property is read-only. To set its value, you must inherit from this class.

Example [Visual Basic]

The following example shows how to get an array of type EventDescriptor using the All property. It assumes that Button1 has been instantiated on a form.

[Visual Basic]

Private Sub GetAllEvents()
   ' Create a new collection and assign it the events for Button1.
   Dim events As EventDescriptorCollection
   events = TypeDescriptor.GetEvents(Button1)

   ' Get all the EventDescriptors.
   Dim eArray() As EventDescriptor
   eArray = events.All

   ' Print all the event names in a text box.
   Dim i As Integer
   For i = 0 To eArray.Length - 1
      TextBox1.Text &= " " & eArray(i).Name
   Next
End Sub

See Also

EventDescriptorCollection Class | EventDescriptorCollection Members | System.ComponentModel Namespace | EventDescriptor | TypeDescriptor