共用方式為


SPUtility.GetSPListFromName method (SPContext, SPWeb, Guid, String, String, String)

擷取指定的 SharePoint 清單。

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

Syntax

'宣告
Public Shared Function GetSPListFromName ( _
    context As SPContext, _
    web As SPWeb, _
    webId As Guid, _
    listGuid As String, _
    listUrl As String, _
    listDisplayName As String _
) As SPList
'用途
Dim context As SPContext
Dim web As SPWeb
Dim webId As Guid
Dim listGuid As String
Dim listUrl As String
Dim listDisplayName As String
Dim returnValue As SPList

returnValue = SPUtility.GetSPListFromName(context, _
    web, webId, listGuid, listUrl, listDisplayName)
public static SPList GetSPListFromName(
    SPContext context,
    SPWeb web,
    Guid webId,
    string listGuid,
    string listUrl,
    string listDisplayName
)

參數

  • webId
    Type: System.Guid

    SharePoint 網站清單所屬全域唯一識別碼 (GUID)。

  • listGuid
    Type: System.String

    字串,可提供清單的全域唯一識別碼 (GUID)。

  • listDisplayName
    Type: System.String

    提供清單的顯示名稱的字串。

傳回值

Type: Microsoft.SharePoint.SPList
SharePoint 清單中所提供的參數相關聯。

備註

此GetSPListFromName方法會先嘗試比對指定的listGuid,則listUrl,及最後listDisplayName清單。

請參閱

參照

SPUtility class

SPUtility members

GetSPListFromName overload

Microsoft.SharePoint.Utilities namespace