Share via


ServerProtocolCollection.Contains Method

Checks whether the specified key value exists in the collection.

Namespace:  Microsoft.SqlServer.Management.Smo.Wmi
Assembly:  Microsoft.SqlServer.SqlWmiManagement (in Microsoft.SqlServer.SqlWmiManagement.dll)

Syntax

'Declaration
Public Function Contains ( _
    key As String _
) As Boolean
'Usage
Dim instance As ServerProtocolCollection
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

Parameters

  • key
    Type: System.String
    A String value that specifies the key value to check the existence of in the collection.

Return Value

Type: System.Boolean
A Boolean value that specifies whether the key value exists in the collection.
If True, the key value exists in the collection.
If False, the key value does not exist in the collection.