I have a class with json properties and I would like it to receive an integer which is the number of zeros that should be multiplied only for the decimal properties.
2 = multiply by 100 3 = multiply by 1000 etc
...
[JsonProperty("max_total_txn_value")]
public decimal MaxTotalTxnValue
{
//example: multiplying to 2 (2 zeros)
get { return maxTotalTxnValue / 100; }
set { maxTotalTxnValue = value * 100; }
}
...
...
[JsonConstructor]
{
//some code mabe here
}
...
Example:
if I pass 3 (int)
12.00 (value decimal)
12.00 x 1000(3 zeros)
Result: 12000