SPEventReceiverDefinitionCollection.Add method (Guid, SPList)

Creates an event receiver definition in the collection based on the specified GUID and Microsoft SharePoint Foundation list.

Namespace:  Microsoft.SharePoint
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)

Syntax

'Declaration
Public Function Add ( _
    Id As Guid, _
    contextList As SPList _
) As SPEventReceiverDefinition
'Usage
Dim instance As SPEventReceiverDefinitionCollection
Dim Id As Guid
Dim contextList As SPList
Dim returnValue As SPEventReceiverDefinition

returnValue = instance.Add(Id, contextList)
public SPEventReceiverDefinition Add(
    Guid Id,
    SPList contextList
)

Parameters

  • Id
    Type: System.Guid

    A System.Guid that represents the event receiver definition.

Return value

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

See also

Reference

SPEventReceiverDefinitionCollection class

SPEventReceiverDefinitionCollection members

Add overload

Microsoft.SharePoint namespace

SPEventReceiverType

SPField

SPItem