SPQuota.StorageWarningLevel property

Gets or sets a storage warning level for when administrators of the site collection receive advance notice before available storage is expended.

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

Syntax

'Declaration
Public Property StorageWarningLevel As Long
    Get
    Set
'Usage
Dim instance As SPQuota
Dim value As Long

value = instance.StorageWarningLevel

instance.StorageWarningLevel = value
public long StorageWarningLevel { get; set; }

Property value

Type: System.Int64
A 64-bit integer that specifies the warning level. The default value is 0 (zero).

Examples

The following code example sets a maximum level and a warning level for storage in a specified site collection.

Dim siteCollection As New SPSite("http://MySiteCollection")
Dim quota As SPQuota = siteCollection.Quota

quota.StorageMaximumLevel = 20000000 'bytes
quota.StorageWarningLevel = 10000000 'bytes

siteCollection.Quota = quota 
SPSite siteCollection = new SPSite("http://MySiteCollection");
SPQuota quota = siteCollection.Quota;

quota.StorageMaximumLevel = 20000000; //bytes
quota.StorageWarningLevel = 10000000; //bytes

siteCollection.Quota = quota;

See also

Reference

SPQuota class

SPQuota members

Microsoft.SharePoint.Administration namespace