Share via


SPAlert.List property

Gets or sets the list or document library to which the alert applies.

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

Syntax

'Declaration
Public Property List As SPList
    Get
    Set
'Usage
Dim instance As SPAlert
Dim value As SPList

value = instance.List

instance.List = value
public SPList List { get; set; }

Property value

Type: Microsoft.SharePoint.SPList
An SPList object that represents the list or document library.

Remarks

The List property throws an SPException in the following situations:

  • If used to get the list and the AlertType property does not contain List or Item.

  • If used to set the list and the AlertType property does not contain List.

  • If set prior to setting the AlertType property.

  • If changed after the Update method is called.

See also

Reference

SPAlert class

SPAlert members

Microsoft.SharePoint namespace