AddCalculation
public void AddCalculation(string column, GameInfoOperator operator, int number);
public void AddCalculation(string column, GameInfoOperator operator, long number);
public void AddCalculation(string column, GameInfoOperator operator, double number);
Parameters
Value | Type | Description |
---|---|---|
column | string | Name of the column to be calculated(key value) |
operator | GameInfoOperator(enum) | Calculation to be performed |
number | int/long/double | Value to be calculated |
Double type data may be rounded up.
GameInfoOperation(enum)
Value | Description |
---|---|
addition | Performs addition of the number to the stored value |
subtraction | Performs subtraction of the number to the stored value |
multiplication | Performs multiplication of the number to the stored value |
division | Performs division of the number to the stored value |
Description
This method is used to declare the column for the calculation when passing param as a parameter of the UpdateWithCalculation method.
- The key must not begin with a number. If it does, a warning is displayed and it is not added to Param.
Example
Param param = new Param();
// Addition command
param.AddCalculation("column1", GameInfoOperator.addition, 20);
// Subtraction command
param.AddCalculation("column2", GameInfoOperator.subtraction, 20);
// Multiplication command
param.AddCalculation("column3", GameInfoOperator.multiplication, 20);
// Division command
param.AddCalculation("column4", GameInfoOperator.division, 20);