SPListCollection.GetList method (Guid, Boolean)
Returns the list with the specified GUID from the collection.
Namespace: Microsoft.SharePoint
Assembly: Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Syntax
'Declaration
Public Function GetList ( _
uniqueId As Guid, _
fetchMetadata As Boolean _
) As SPList
'Usage
Dim instance As SPListCollection
Dim uniqueId As Guid
Dim fetchMetadata As Boolean
Dim returnValue As SPList
returnValue = instance.GetList(uniqueId, _
fetchMetadata)
public SPList GetList(
Guid uniqueId,
bool fetchMetadata
)
Parameters
uniqueId
Type: System.GuidThe GUID for the list to return.
fetchMetadata
Type: System.Booleantrue to retrieve metadata for the views and forms of the list; otherwise, false.
Return value
Type: Microsoft.SharePoint.SPList
An object that represents the list.
Remarks
The GetList method throws an SPException exception if the GUID specified for the uniqueId parameter is invalid.