System.Security.Principal.GenericPrincipal.IsInRole Method

Determines whether the current System.Security.Principal.GenericPrincipal belongs to the specified role.

Syntax

public virtual bool IsInRole (string role)

Parameters

role
The name of the role for which to check membership.

Returns

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

Remarks

Roles are case sensitive.

Requirements

Namespace: System.Security.Principal
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0, 4.0.0.0