Gets a value indicating whether the specified user is in the specified role.
Namespace:
Novalys.VisualGuard.Security.WebFormAssembly: Novalys.VisualGuard.Security.WebForm (in Novalys.VisualGuard.Security.WebForm.dll) Version: 3.2.912.1 (3.2.912.01)
Syntax
C# |
---|
public override bool IsUserInRole( string username, string roleName ) |
Visual Basic (Declaration) |
---|
Public Overrides Function IsUserInRole ( _ username As String, _ roleName As String _ ) As Boolean |
Parameters
- username
- Type: System..::.String
The name of the user to search for.
- roleName
- Type: System..::.String
The name of the role to search in.
Return Value
true if the specified user is in the specified role; otherwise, false.Exceptions
Exception | Condition |
---|---|
System..::.ArgumentNullException | roleName is null.
-or- username is null. |
System..::.ArgumentException | roleName is an empty string.
-or- username is an empty string. |