Name Property
Collapse the table of content
Expand the table of content

IIdentity.Name Property

 

Gets the name of the current user.

Namespace:   System.Security.Principal
Assembly:  mscorlib (in mscorlib.dll)

string Name { get; }

Property Value

Type: System.String

The name of the user on whose behalf the code is running.

The user name is passed to the common language runtime by the operating system or other authentication provider (such as ASP.NET).

Name is typically set to an empty string ("") for an unauthenticated entity, but can take other values.

Universal Windows Platform
Available since 8
.NET Framework
Available since 1.1
Portable Class Library
Supported in: portable .NET platforms
Silverlight
Available since 2.0
Windows Phone Silverlight
Available since 7.0
Windows Phone
Available since 8.1
Return to top
Show:
© 2016 Microsoft