keys

Summary

Returns the keys of the dictionary (optionally filtering the keys to match specified values in the key-value pair).

Signatures

Click on a signature to select it and view its documentation.

Usage

public string[] keys()

Returns

An array of the dictionary's keys.

Description

Returns all the keys of the dictionary in an array.

Examples

Basic Usage
1
2
3
4
5
6
7
import System;
 
Dictionary<int> empty = {};
Dictionary<int> notEmpty = { a: 10, b: 11, c: 12 };
 
Console.log(empty.keys());    // []
Console.log(notEmpty.keys()); // [ "a", "b", "c" ]

Share

HTML | BBCode | Direct Link