Class

DictionaryEntry


Description

The DictionaryEntry 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 DictionaryEntry property values.

Properties

Name

Type

Read-Only

Shared

Key

Variant

Value

Variant

Property descriptions


DictionaryEntry.Key

Key As Variant

The entry's key.

This property is read-only.


DictionaryEntry.Value

Value As Variant

The entry's value.

This property is read-only.

Sample code

Loop through keys in a Dictionary:

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

All project types on all supported operating systems.

See also

Object parent class; Dictionary class