SPEventReceiverDefinitionCollection.EventReceiverDefinitionExist Method
Returns a Boolean variable that specifies whether an event receiver definition with the specified Guid exists in the collection.
Namespace: Microsoft.SharePoint
Assembly: Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Available in Sandboxed Solutions: Yes
Available in SharePoint Online
Syntax
'Declaration
Public Function EventReceiverDefinitionExist ( _
eventReceiverId As Guid _
) As Boolean
'Usage
Dim instance As SPEventReceiverDefinitionCollection
Dim eventReceiverId As Guid
Dim returnValue As Boolean
returnValue = instance.EventReceiverDefinitionExist(eventReceiverId)
public bool EventReceiverDefinitionExist(
Guid eventReceiverId
)
Parameters
eventReceiverId
Type: System.GuidA Guid that specifies the event receiver definition.
Return Value
Type: System.Boolean
true if the event receiver definition exists in the collection; otherwise, false.
Remarks
SPEventReceiverDefinition methods such as ItemAdded(SPItemEventProperties) can be reused. There can be a one-to-many correspondence between the event receivers and the SharePoint Foundation objects that can generate events.
See Also
Reference
SPEventReceiverDefinitionCollection Class
SPEventReceiverDefinitionCollection Members
Microsoft.SharePoint Namespace
Other Resources
Event Registrations