This documentation is archived and is not being maintained.
GenericPrincipal.IsInRole Method
Visual Studio 2010
Determines whether the current GenericPrincipal belongs to the specified role.
Assembly: mscorlib (in mscorlib.dll)
Parameters
- role
- Type: System.String
The name of the role for which to check membership.
Return Value
Type: System.Booleantrue if the current GenericPrincipal is a member of the specified role; otherwise, false.
Implements
IPrincipal.IsInRole(String)The following code shows the use of the IsInRole method. This code example is part of a larger example provided for the GenericPrincipal class.
Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
Show: