MetadataDefaults Constructor (SPList)
Initializes a new instance of a [T:Microsoft.Office.DocumentManagement.MetadataDefaults(Microsoft.SharePoint.SPList)] object.
Namespace: Microsoft.Office.DocumentManagement
Assembly: Microsoft.Office.DocumentManagement (in Microsoft.Office.DocumentManagement.dll)
Syntax
'Declaration
Public Sub New ( _
list As SPList _
)
'Usage
Dim list As SPList
Dim instance As New MetadataDefaults(list)
public MetadataDefaults(
SPList list
)
Parameters
list
Type: Microsoft.SharePoint.SPListThe Document Library that the specified MetadataDefault objects apply to
Exceptions
Exception | Condition |
---|---|
ArgumentNullException | The list parameter is set to a null reference (Nothing in Visual Basic). The list parameter should be set to a value other than a null reference (Nothing in Visual Basic). (ArgumentNullException.ParamName="list") |
Remarks
Only document libraries should passed as the list parameter.
Examples
SPSite site = new SPSite("http://contoso"); SPWeb web = site.OpenWeb("/"); SPList list = web.Lists["Documents"]; MetadataDefaults defaults = MetadataDefaults(list);