Share via


Web.CurrentUser property

Gets the current user of the site.

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

Syntax

'Declaration
Public ReadOnly Property CurrentUser As User
    Get
'Usage
Dim instance As Web
Dim value As User

value = instance.CurrentUser
public User CurrentUser { get; }

Property value

Type: Microsoft.SharePoint.Client.User
A User object that represents the current user.

Remarks

It must not be a null reference (Nothing in Visual Basic).

See also

Reference

Web class

Web members

Microsoft.SharePoint.Client namespace