Add
public void Add(string key, T value);
Parameters
Value | Type | Description |
---|---|---|
key | string | Key of the column to be added. |
value | T | Value of the column to be added. |
Description
Add a column to Param.
- The key must not begin with a number. If it does, a warning is displayed and it is not added to Param.
- For value, any value format supported in c# can be added.
- In SDK versions under 5.2.1, not all data types can be added to Param.
- For more information on data types that can be added in SDK versions under 5.2.1, please refer to the table at the bottom of the documentation.
- Float/double type data can be rounded off.
- For data in dictionary format, an error may occur if it exceeds depth 3.
- If data in class format is included, private variables in the class are not added to Param.
Among private variables, the value to be added to param can be set by inserting it as a (property).
Example
Param param = new Param();
param.Add("hp", 512);
Data types that can be added in SDK versions under 5.2.1
Data Type | Description |
---|---|
int | 32-bit signed integer |
long | 64-bit signed integer |
double | Signed 8-byte floating point |
bool | Bool(true/false) |
string | Unicode text sequence with 0 or more characters |
Param | Param provided by BACKND |
JsonData | JSON data stored as BACKND.LitJson.JsonData type (This data format is supported in SDK 5.0.1 or later versions.) |
T | Reference type generic. Includes the random class declared by the developer and all data not included in the above data format. |
Array | Data in array format |
List | Data in list format |
Dictionary<string, T> | Data in dictionary format |