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)
Available in Sandboxed Solutions: No
Syntax
'Declaration
<SubsetCallableExcludeMemberAttribute(SubsetCallableExcludeMemberType.PerSpec)> _
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)
[SubsetCallableExcludeMemberAttribute(SubsetCallableExcludeMemberType.PerSpec)]
public SPEventReceiverDefinition Add(
Guid Id,
SPList contextList
)
Parameters
Id
Type: System.GuidA System.Guid that represents the event receiver definition.
contextList
Type: Microsoft.SharePoint.SPListAn SPList object that represents the list.
Return Value
Type: Microsoft.SharePoint.SPEventReceiverDefinition
An SPEventReceiverDefinition object that represents the event receiver definition.
See Also
Reference
SPEventReceiverDefinitionCollection Class
SPEventReceiverDefinitionCollection Members