SPEventReceiverDefinition.SequenceNumber property

Gets or sets an integer that represents the relative sequence of the event.

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


Public Property SequenceNumber As Integer
Dim instance As SPEventReceiverDefinition
Dim value As Integer

value = instance.SequenceNumber

instance.SequenceNumber = value
public int SequenceNumber { get; set; }

Property value

Type: System.Int32
A 32-bit integer representing the sequence number.


The SequenceNumber property throws an ArgumentOutOfRangeException if it is set to a value less than zero or greater than 65,536.

This property determines the order in which event assemblies execute. This is especially important when there are multiple assemblies that are attached to the same SPSite, SPList or SPContentType event. SharePoint Foundation event processing can be perceived as a procession of steps or machine states that occur in order until the last activity completes. The creation of the steps is not sequential, so the order of processing is specified with loosely sequential sequence numbers. Because the sequence numbers are not incremented by one, the developer can group the events in the approximate order of processing when the events are created.

See also


SPEventReceiverDefinition class

SPEventReceiverDefinition members

Microsoft.SharePoint namespace


Other resources

Building Custom Workflow Conditions for SharePoint Designer