ES2.LoadDictionary
Parameters
TKey | TValue | The type of the key and value of the Dictionary. Must be on the Supported Types list. |
path |
The path where our data is stored. For more information, see Paths. | |
settings |
Optional. A user-created ES2Settings object containing options not specified in path. |
Returns
Dictionary<TKey TValue> | Our loaded Dictionary. |
Description
Loads a Dictionary containing data pairs of type TKey,TValue from the specified path.
C#
1 2 3 4 5 6 7 8 9 |
// Create a Dictionary of string/int pairs and save it. Dictionary myDictionary<string, int> = new Dictionary<string, int>(); myDictionary["A"] = 1; myDictionary["B"] = 2; ES2.Save(myDictionary, "myFile.txt?tag=myDictionary"); // Load the Dictionary and re-assign it to our variable. myDictionary = ES2.LoadDictionary<string, int>("myFile.txt?tag=myDictionary"); |
JS
1 2 3 4 5 6 7 8 9 |
// Create a Dictionary of string/int pairs and save it. var myDictionary = new Dictionary.<String, int>(); myDictionary["A"] = 1; myDictionary["B"] = 2; ES2.Save(myDictionary, "myFile.txt?tag=myDictionary"); // Load the Dictionary and re-assign it to our variable. myDictionary = ES2.LoadDictionary.<String, int>("myFile.txt?tag=myDictionary"); |