IsInRole Method
Collapse the table of content
Expand the table of content
This documentation is archived and is not being maintained.

IPrincipal.IsInRole Method

Determines whether the current principal belongs to the specified role.

[Visual Basic]
Function IsInRole( _
   ByVal role As String _
) As Boolean
[C#]
bool IsInRole(
   string role
);
[C++]
bool IsInRole(
   String* role
);
[JScript]
function IsInRole(
   role : String
) : Boolean;

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.

Requirements

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

IPrincipal Interface | IPrincipal Members | System.Security.Principal Namespace

Show:
© 2016 Microsoft