UserBase.IsInRole Method

WCF RIA Services

[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)

'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)

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

IPrincipal.IsInRole(String)

Indicates whether the specified role is contained in the Roles property. This implementation is case sensitive.

Show: