SPEventReceiverDefinitionCollection.Add Method

Creates an event receiver definition in the collection.

Namespace:  Microsoft.SharePoint
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Available in Sandboxed Solutions: No

public SPEventReceiverDefinition Add()

Return Value

Type: Microsoft.SharePoint.SPEventReceiverDefinition
An SPEventReceiverDefinition object that represents the event receiver definition.

The event receiver added to the collection by this method has an EmptyGuid and no SPList.