语言

SecurityCallContext.IsUserInRole(String, String) 方法

定义

验证指定用户是否处于指定角色。

public:
 bool IsUserInRole(System::String ^ user, System::String ^ role);
public bool IsUserInRole(string user, string role);
member this.IsUserInRole : string * string -> bool
Public Function IsUserInRole (user As String, role As String) As Boolean

参数

user
String

指定的用户。

role
String

指定的角色。

返回

true 如果指定用户是指定角色的成员,则为 ;否则,为 false.

适用于