ServiceCollection.Contains メソッド

指定したキーの値がコレクション内に存在するかどうかを確認します。

名前空間:  Microsoft.SqlServer.Management.Smo.Wmi
アセンブリ:  Microsoft.SqlServer.SqlWmiManagement (Microsoft.SqlServer.SqlWmiManagement.dll)

構文

'宣言
Public Function Contains ( _
    key As String _
) As Boolean
'使用
Dim instance As ServiceCollection 
Dim key As String 
Dim returnValue As Boolean 

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

パラメーター

  • key
    型: System.String
    コレクション内に存在するかどうかを確認するためのキーの値を示す String 値です。

戻り値

型: System.Boolean
コレクション内にキーの値が存在するかどうかを示す Boolean 値です。True の場合、キーの値はコレクション内に存在します。False の場合、キーの値はコレクション内に存在しません。

使用例

コレクションの使用

関連項目

参照

ServiceCollection クラス

Microsoft.SqlServer.Management.Smo.Wmi 名前空間