Compartilhar via


ListCollection.GetByTitle Method

Returns the list with the specified title from the collection.

Namespace:  Microsoft.SharePoint.Client
Assemblies:   Microsoft.SharePoint.Client.Silverlight (in Microsoft.SharePoint.Client.Silverlight.dll);  Microsoft.SharePoint.Client (in Microsoft.SharePoint.Client.dll)

Syntax

'Declaration
<RemoteAttribute> _
Public Function GetByTitle ( _
    strListName As String _
) As List
'Usage
Dim instance As ListCollection
Dim strListName As String
Dim returnValue As List

returnValue = instance.GetByTitle(strListName)
[RemoteAttribute]
public List GetByTitle(
    string strListName
)

Parameters

  • strListName
    Type: System.String

    A string containing the list title.

    It must not be a null reference (Nothing in Visual Basic). It must not be empty. Its length must be equal to or less than 255.

Return Value

Type: Microsoft.SharePoint.Client.List
A List object that represents the list.

Exceptions

Exception Condition
ArgumentException

The list does not exist. Error code: -2147024809.

UnauthorizedAccessException

The current user has insufficient permissions to perform the operation. Error code: - 2147024891.

See Also

Reference

ListCollection Class

ListCollection Members

Microsoft.SharePoint.Client Namespace