共用方式為


UserCollection.GetByEmail 方法

傳回指定的電子郵件地址的使用者。

命名空間:  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 GetByEmail ( _
    emailAddress As String _
) As User
'用途
Dim instance As UserCollection
Dim emailAddress As String
Dim returnValue As User

returnValue = instance.GetByEmail(emailAddress)
public User GetByEmail(
    string emailAddress
)

參數

  • emailAddress
    類型:System.String

    字串包含使用者的電子郵件地址。

    它不能null 參考 (未執行任何動作 於 Visual Basic 中)。

    它必須不是空的。

    其長度必須等於或小於 255。

傳回值

類型:Microsoft.SharePoint.Client.User
傳回代表使用者指定的電子郵件地址User.instance。

例外狀況

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

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

[System.UnauthorizedAccessException]

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

請參閱

參照

UserCollection 類別

UserCollection 成員

Microsoft.SharePoint.Client 命名空間