共用方式為


Login.ListMembers 方法

Returns a list of the roles of which the login account is a member.

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

語法

'宣告
Public Function ListMembers As StringCollection
'用途
Dim instance As Login 
Dim returnValue As StringCollection 

returnValue = instance.ListMembers()
public StringCollection ListMembers()
public:
StringCollection^ ListMembers()
member ListMembers : unit -> StringCollection
public function ListMembers() : StringCollection

傳回值

型別:System.Collections.Specialized.StringCollection
A StringCollection object value that contains a list of role names of which the login account is a member.

範例

管理使用者、角色和登入

請參閱

參考

Login 類別

Microsoft.SqlServer.Management.Smo 命名空間

其他資源

主體 (Database Engine)

CREATE LOGIN (Transact-SQL)