Class

# DictionaryEntry

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

## Description

The <span class="title-ref">DictionaryEntry</span> class represents a single key-value pair in a Dictionary. It is immutable and is not tied to the Dictionary it was created from, so subsequent updates to the Dictionary will not change the <span class="title-ref">DictionaryEntry</span> property values.

## Properties

<div class="rst-class">

table-centered_columns_3_and_4

</div>

| Name                           | Type                               | Read-Only | Shared |
|--------------------------------|------------------------------------|-----------|--------|
| `Key<dictionaryentry.key>`     | `Variant</api/data_types/variant>` |           |        |
| `Value<dictionaryentry.value>` | `Variant</api/data_types/variant>` |           |        |

## Property descriptions

<div id="dictionaryentry.key">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

DictionaryEntry.Key

**Key** As `Variant</api/data_types/variant>`

> The entry's key.

<div id="dictionaryentry.value">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

DictionaryEntry.Value

**Value** As `Variant</api/data_types/variant>`

> The entry's value.

## Sample code

Loop through keys in a Dictionary:

``` xojo
Var months As New Dictionary
months.Value("January") = 31
months.Value("February") = 28
months.Value("March") = 31
months.Value("April") = 30
months.Value("May") = 31
months.Value("June") = 30
months.Value("July") = 31
months.Value("August") = 31
months.Value("September") = 30
months.Value("October") = 31
months.Value("November") = 30
months.Value("December") = 31

For Each days As DictionaryEntry In months
  Var numDays As Integer = days.Value
Next
```

## Compatibility

|                       |     |
|-----------------------|-----|
| **Project Types**     | All |
| **Operating Systems** | All |

<div class="seealso">

`Object</api/data_types/additional_types/object>` parent class; `Dictionary</api/language/dictionary>` class

</div>
