TypeDescriptor.GetDefaultEvent Method (Object)

Returns the default event for the specified component.

Namespace:  System.ComponentModel
Assembly:  System (in System.dll)

static member GetDefaultEvent : 
        component:Object -> EventDescriptor

Parameters

component
Type: System.Object

The component to get the event for.

Return Value

Type: System.ComponentModel.EventDescriptor
An EventDescriptor with the default event, or a null reference (Nothing in Visual Basic) if there are no events.

ExceptionCondition
ArgumentNullException

component is a null reference (Nothing in Visual Basic).

NotSupportedException

component is a cross-process remoted object.

This method is equivalent to the overloaded GetDefaultEvent(Object, Boolean) method with a second parameter of false.

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0, 2.0, 1.1

.NET Framework Client Profile

Supported in: 4, 3.5 SP1
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2015 Microsoft