This topic has not yet been rated - Rate this topic

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)
Available in Sandboxed Solutions: Yes
Available in SharePoint Online
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.

Did you find this helpful?
(1500 characters remaining)
Community Content Add
Annotations FAQ
Wrong maximum allowed Value
Contrary to the Information in MSDN, the maximum allowed Value is not 65536 but 65535