Hash Tables

From ETC Public Wiki
Jump to: navigation, search

A Hashtable is a type of collection where each item is made up of a “Key and Value” pair. table["key"] = "value"


Declare a Hashtable:

var board = new Hashtable [r];

-OR-

var board = new Hashtable [c,r];


Loop through the table:

 for (var field: DictionaryEntry  in myHashtable)//get the fields
     {
        print("Key:" + field.Key + " Val: " + field.Value );
     }