ES2.Load2DArray
Parameters
T | The type of the data in the array we want to load. 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
T[ | ] | Our loaded array. |
Description
Loads a native 2D array containing data of type T from the specified path.
C#
1 2 3 4 5 6 |
// Create a 2D array of strings and save it. string[,] stringArray = new string[,]{{"String1", "String2"}, {"String3", "String4"}}; ES2.Save(stringArray, "myFile.txt?tag=stringArray"); // Load the string array and re-assign it to our stringArray variable. stringArray = ES2.Load2DArray<string>("myFile.txt?tag=stringArray"); |
JS
1 2 3 4 5 6 7 8 9 10 |
// Create a 2D array of strings and save it. var stringArray : String[,]; stringArray[0,0] = "String1"; stringArray[0,1] = "String2"; stringArray[1,0] = "String3"; stringArray[1,1] = "String4"; ES2.Save(stringArray, "myFile.txt?tag=stringArray"); // Load the string array and re-assign it to our stringArray variable. stringArray = ES2.Load2DArray.<String>("myFile.txt?tag=stringArray"); |