Dictionary.KeyCount

From Xojo Documentation

Read-Only Property (As Integer )
IntegerValue = aDictionary.KeyCount

New in 2019r2

Supported on Desktop, Web, Console.

The number of key-value pairs in the Dictionary.

Notes

Returns the actual Count, not the Ubound of an array.

Sample Code

The following code displays the number of key-value pairs:

Var d As New Dictionary
// display the entries for the dictionary
MessageBox(d.KeyCount.ToString)