Click to Rate and Give Feedback
Community Content
In this section
Statistics Annotations (0)
Collapse All/Expand All Collapse All
This page is specific to
The 2007 product release

Other versions are also available for the following:
SPEventReceiverDefinitionCollection Class (Microsoft.SharePoint)
Represents a collection of SPEventReceiverDefinition objects that are used to enumerate the list of registered event receivers for Windows SharePoint Services objects that can have events.

Namespace: Microsoft.SharePoint
Assembly: Microsoft.SharePoint (in microsoft.sharepoint.dll)
Visual Basic (Declaration)
<DefaultMemberAttribute("Item")> _
<SharePointPermissionAttribute(SecurityAction.InheritanceDemand, ObjectModel:=True)> _
<SharePointPermissionAttribute(SecurityAction.LinkDemand, ObjectModel:=True)> _
Public Class SPEventReceiverDefinitionCollection
    Inherits SPBaseCollection
Visual Basic (Usage)
Dim instance As SPEventReceiverDefinitionCollection
C#
[DefaultMemberAttribute("Item")] 
[SharePointPermissionAttribute(SecurityAction.InheritanceDemand, ObjectModel=true)] 
[SharePointPermissionAttribute(SecurityAction.LinkDemand, ObjectModel=true)] 
public class SPEventReceiverDefinitionCollection : SPBaseCollection

Use the EventReceivers property of the SPContentType, SPFile, SPList, SPListItem, SPWeb, or SPWorkflow class to get the collection of event receivers that are registered for the Windows SharePoint Services object.

To create an event receiver definition, use one of the Add methods of the SPEventReceiverDefinitionCollection class.

Use an indexer to return a single event receiver definition from the collection. For example, assuming that the collection is assigned to a variable named myEventReceiverDefinitions, use myEventReceiverDefinitions[index] in C#, or myEventReceiverDefinitions(index) in Visual Basic .NET, where index is either the index number of the definition in the collection or the Guid of the definition.

System.Object
   Microsoft.SharePoint.Administration.SPAutoSerializingObject
     Microsoft.SharePoint.SPBaseCollection
      Microsoft.SharePoint.SPEventReceiverDefinitionCollection
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Processing
© 2009 Microsoft Corporation. All rights reserved. Terms of Use | Trademarks | Privacy Statement
Page view tracker