次の方法で共有


RoleCollection.GetByName メソッド

指定した名前を持つ Role をコレクションから取得します。

名前空間:  Microsoft.AnalysisServices
アセンブリ:  Microsoft.AnalysisServices (Microsoft.AnalysisServices.dll)

構文

'宣言
Public Function GetByName ( _
    name As String _
) As Role
'使用
Dim instance As RoleCollection 
Dim name As String 
Dim returnValue As Role 

returnValue = instance.GetByName(name)
public Role GetByName(
    string name
)
public:
Role^ GetByName(
    String^ name
)
member GetByName : 
        name:string -> Role
public function GetByName(
    name : String
) : Role

パラメーター

戻り値

型: Microsoft.AnalysisServices.Role
コレクションに存在する場合は Role です。

例外

例外 条件
ItemNotFoundException

name がコレクションに存在しません。

関連項目

参照

RoleCollection クラス

Microsoft.AnalysisServices 名前空間