The requested page is not available for the requested platform. You are viewing the content for Default platform.

BoolList.Contains(String) Method

Indicates whether a particular key exists in the BoolList's collection of key/value pairs.

Namespace: DevExpress.ExpressApp.Utils

Assembly: DevExpress.ExpressApp.v19.1.dll

Declaration

public bool Contains(
    string key
)
Public Function Contains(
    key As String
) As Boolean

Parameters

Name Type Description
key String

A string representing the key that will be checked for existence in the BoolList's collection of key/value pairs.

Returns

Type Description
Boolean

true, if the specified key exists in the BoolList's collection of key/value pairs; otherwise, false.

Remarks

You can use this method, prior to reading the value associated with a key, via the BoolList.Item indexer property, to check that a key/value pair exists for the key. The following code snippet illustrates this.

BoolList mylist = new BoolList();
//...
Boolean myValue = false;
if (mylist.Contains("myKey")) {
    myValue = mylist["myKey"];
}

To get all keys from the BoolList's collection of key/value pairs, use the BoolList.GetKeys method.

See Also