共用方式為


Login.IsMember 方法

Returns a Boolean value that specifies whether the login account is a member of a specified role.

命名空間:  Microsoft.SqlServer.Management.Smo
組件:  Microsoft.SqlServer.Smo (在 Microsoft.SqlServer.Smo.dll 中)

語法

'宣告
Public Function IsMember ( _
    role As String _
) As Boolean
'用途
Dim instance As Login 
Dim role As String 
Dim returnValue As Boolean 

returnValue = instance.IsMember(role)
public bool IsMember(
    string role
)
public:
bool IsMember(
    String^ role
)
member IsMember : 
        role:string -> bool
public function IsMember(
    role : String
) : boolean

參數

傳回值

型別:System.Boolean
A Boolean value that specifies whether the login account is a member of the specified role or not.If True, the login account is a member of the specified role.If False, the login account is not a member of the specified role.

範例

管理使用者、角色和登入

請參閱

參考

Login 類別

Microsoft.SqlServer.Management.Smo 命名空間

其他資源

主體 (Database Engine)

CREATE LOGIN (Transact-SQL)