語言

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

適用於