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
bool IsInRole(
   string role
bool IsInRole(
   String* role
function IsInRole(
   role : String
) : Boolean;


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.


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

© 2016 Microsoft