Web.CurrentUser Property

Gets the current user of the site.

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 ReadOnly Property CurrentUser As User
    Get
'Usage
Dim instance As Web
Dim value As User

value = instance.CurrentUser
[RemoteAttribute]
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