Share via


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

Syntax

'Declaration
Public Property SequenceNumber As Integer
    Get
    Set
'Usage
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.

Remarks

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

Reference

SPEventReceiverDefinition Class

SPEventReceiverDefinition Members

Microsoft.SharePoint Namespace

SPWorkflow

Other Resources

Building Custom Workflow Conditions for SharePoint Designer