UserBase.IsInRole Method
[WCF RIA Services Version 1 Service Pack 2 is compatible with either .NET framework 4 or .NET Framework 4.5, and with either Silverlight 4 or Silverlight 5.]
Determines whether the current user belongs to the specified role.
Namespace: System.ServiceModel.DomainServices.Server.ApplicationServices
Assembly: System.ServiceModel.DomainServices.Server (in System.ServiceModel.DomainServices.Server.dll)
Syntax
'Declaration
Public Function IsInRole ( _
role As String _
) As Boolean
'Usage
Dim instance As UserBase
Dim role As String
Dim returnValue As Boolean
returnValue = instance.IsInRole(role)
public bool IsInRole(
string role
)
public:
virtual bool IsInRole(
String^ role
) sealed
abstract IsInRole :
role:string -> bool
override IsInRole :
role:string -> bool
public final function IsInRole(
role : String
) : boolean
Parameters
- role
Type: System.String
The name of the role to check for membership.
Return Value
Type: System.Boolean
true if the current user is a member of the specified role; otherwise, false.
Implements
Remarks
Indicates whether the specified role is contained in the Roles property. This implementation is case sensitive.
See Also
Reference
System.ServiceModel.DomainServices.Server.ApplicationServices Namespace