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 (int rid)

Parameters

rid
An integer representing the group. [Edit]

Returns

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

Remarks

The role id, is mapped like this:
Role IDDescription
544BUILTIN\\Administrators
545BUILTIN\\Users
546BUILTIN\\Guests
547BUILTIN\\Power Users
548BUILTIN\\Account Operators
549BUILTIN\\System Operators
550BUILTIN\\Print Operators
551BUILTIN\\Backup Operators
552BUILTIN\\Replicator
[Edit]

Requirements

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