Share via


SPQuotaTemplateCollection.Item Property (String)

Gets or sets a quota template object with the specified name in the collection. In C#, this property is an indexer for the SPQuotaTemplateCollection class.

Namespace:  Microsoft.SharePoint.Administration
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Available in Sandboxed Solutions: No

Syntax

'Declaration
Public Default Property Item ( _
    name As String _
) As SPQuotaTemplate
    Get
    Set
'Usage
Dim instance As SPQuotaTemplateCollection
Dim name As String
Dim value As SPQuotaTemplate

value = instance(name)

instance(name) = value
public SPQuotaTemplate this[
    string name
] { get; set; }

Parameters

Property Value

Type: Microsoft.SharePoint.Administration.SPQuotaTemplate
An SPQuotaTemplate object that represents the quota template.

Examples

The following code example applies a quota template to a specified site collection.

Dim siteCollection As New SPSite("http://MySiteCollection")

Dim webService As New SPWebService()

siteCollection.Quota = webService.QuotaTemplates("MyQuotaTemplate")
SPSite siteCollection = new SPSite("http://MySiteCollection");

SPWebService webService = new SPWebService();

siteCollection.Quota = webService.QuotaTemplates["MyQuotaTemplate"];

See Also

Reference

SPQuotaTemplateCollection Class

SPQuotaTemplateCollection Members

Item Overload

Microsoft.SharePoint.Administration Namespace