共用方式為


UserCollection.GetById 方法

傳回指定的成員識別碼的使用者

命名空間:  Microsoft.SharePoint.Client
組件:   Microsoft.SharePoint.Client.Silverlight (在 Microsoft.SharePoint.Client.Silverlight.dll 中);  Microsoft.SharePoint.Client.Phone (在 Microsoft.SharePoint.Client.Phone.dll 中)  Microsoft.SharePoint.Client (在 Microsoft.SharePoint.Client.dll 中)

語法

'宣告
Public Function GetById ( _
    id As Integer _
) As User
'用途
Dim instance As UserCollection
Dim id As Integer
Dim returnValue As User

returnValue = instance.GetById(id)
public User GetById(
    int id
)

參數

  • id
    類型:System.Int32

    32 位元整數,指定的成員識別碼。

傳回值

類型:Microsoft.SharePoint.Client.User
傳回代表使用者指定的成員識別碼User執行個體

例外狀況

例外狀況 條件
[Microsoft.SharePoint.SPException]

找不到使用者。錯誤碼 ︰-2146232832。

[System.UnauthorizedAccessException]

目前的使用者會有足夠的權限。錯誤碼 ︰-2147024891。

請參閱

參照

UserCollection 類別

UserCollection 成員

Microsoft.SharePoint.Client 命名空間