Skip to main content
Version: 6.0.0

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

ValueTypeDescription
columnstringName of the column to be calculated(key value)
operatorGameInfoOperator(enum)Calculation to be performed
numberint/long/doubleValue to be calculated

Double type data may be rounded up.

GameInfoOperation(enum)

ValueDescription
additionPerforms addition of the number to the stored value
subtractionPerforms subtraction of the number to the stored value
multiplicationPerforms multiplication of the number to the stored value
divisionPerforms 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);