System.Security.Principal.IIdentity.Name Property

Gets the name of the current user.

Syntax

public string Name { get; }

Value

Textual representation of the current identity (e.g. user name).

Remarks

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

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

Requirements

Namespace: System.Security.Principal
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0, 4.0.0.0