.NET Framework 4.5.2+
.NET Framework 4.5.2+
.NET Standard 2.0+
.NET Core 3.0+

BoolList.SetItemValue(String, Boolean) Method

Assigns a new value to a particular key from the BoolList's collection of key/value pairs.

Namespace: DevExpress.ExpressApp.Utils

Assembly: DevExpress.ExpressApp.v19.2.dll

Declaration

public void SetItemValue(
    string key,
    bool value
)
Public Sub SetItemValue(
    key As String,
    value As Boolean
)
public void SetItemValue(
    string key,
    bool value
)
Public Sub SetItemValue(
    key As String,
    value As Boolean
)
public void SetItemValue(
    string key,
    bool value
)
Public Sub SetItemValue(
    key As String,
    value As Boolean
)

Parameters

Name Type Description
key String

A string representing the key from the BoolList's collection of key/value pairs, to which a new value will be assigned.

value Boolean

A Boolean value to be assigned to the specified key.

Parameters

Name Type Description
key String

A string representing the key from the BoolList's collection of key/value pairs, to which a new value will be assigned.

value Boolean

A Boolean value to be assigned to the specified key.

Parameters

Name Type Description
key String

A string representing the key from the BoolList's collection of key/value pairs, to which a new value will be assigned.

value Boolean

A Boolean value to be assigned to the specified key.

Remarks

If a key/value pair with the specified key does not exist, it is created.

The following code snippet illustrates use of the SetItemValue method:

BoolList mylist = new BoolList();
mylist.SetItemValue("myKey", true); 
//myValue == true;

To get all keys from the BoolList's collection of key/value pairs, use the BoolList.GetKeys method. To check whether a particular key exists, use the BoolList.Contains method.

See Also