Skip to main content
.NET Framework 4.5.2+

BoolList.Item[String] Property

Specifies the value associated with a particular key from the BoolList‘s key/value pair collection.

Namespace: DevExpress.ExpressApp.Utils

Assembly: DevExpress.ExpressApp.v24.1.dll

NuGet Package: DevExpress.ExpressApp

Declaration

public bool this[string key] { get; set; }

Parameters

Name Type Description
key String

A string representing the key from the BoolList‘s key/value pair collection, whose associated value will be retrieved.

Property Value

Type Description
Boolean

A Boolean value associated with the specified key.

Remarks

You can use the indexer property to either retrieve the value associated with a key, or to assign a new value. The following code snippet illustrates this.

BoolList mylist = new BoolList();
mylist["myKey"] = true;
Boolean myValue = mylist["myKey"]; 
//myValue == true;

When using the indexer property to assign the value to a key, if a key/value pair with the specified key does not exist, it is created. To get all keys from the BoolList‘s collection of key/value pairs, use the BoolList.GetKeys method.

See Also