Mono Class Library: System.Security.Principal.WindowsPrincipal Overview | Members

System.Security.Principal.WindowsPrincipal.IsInRole Method

Return the membership of the current principal in the specified role. [Edit]

public virtual bool IsInRole (WindowsBuiltInRole role)

Parameters

role
A member of the System.Security.Principal.WindowsBuiltInRole enumeration. [Edit]

Returns

True if the current identity is a member of the specified role, false otherwise. [Edit]

Remarks

On POSIX compliant systems the WindowsBuiltInRole.Administrators group is mapped to the "root" group. All other groups will return false. [Edit]

Requirements

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