System.Security.Principal.IPrincipal Interface

Assembly: Mscorlib.dll
Namespace: System.Security.Principal
Summary
Defines the basic functionality of a principal object.
C# Syntax:
public interface IPrincipal
Remarks
A principal object represents the security context of the user on whose behalf the code is running, including that user's identity ( IIdentity) and any roles to which they belong.

All principal objects are required to implement the IPrincipal interface.

See also:
System.Security.Principal Namespace

System.Security.Principal.IPrincipal Member List:

Public Properties
Identity Read-only

Gets the identity of the current principal.
Public Methods
IsInRole Determines whether the current principal belongs to the specified role.

System.Security.Principal.IPrincipal Member Details

Property: Identity (read-only)
Summary
Gets the identity of the current principal.
C# Syntax:
IIdentity Identity {get;}

Return to top


Method: IsInRole(
   string role
)
Summary
Determines whether the current principal belongs to the specified role.
C# Syntax:
bool IsInRole(
   string role
);
Parameters:

role

The name of the role for which to check membership.

Return Value:
true if the current principal is a member of the specified role; otherwise, false.

Return to top


Top of page

Copyright (c) 2002 Microsoft Corporation. All rights reserved.