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.

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.