GenericPrincipal.IsInRole Method (String)

 

Determines whether the current GenericPrincipal belongs to the specified role.

Namespace:   System.Security.Principal
Assembly:  mscorlib (in mscorlib.dll)

override IsInRole : 
        role:string -> bool

Parameters

role
Type: System.String

The name of the role for which to check membership.

Return Value

Type: System.Boolean

true if the current GenericPrincipal is a member of the specified role; otherwise, false.

The following code shows the use of the IsInRole method. This code example is part of a larger example provided for the GenericPrincipal class.

No code example is currently available or this language may not be supported.

Universal Windows Platform
Available since 10
.NET Framework
Available since 1.1
Return to top
Show: