4
Reply

How can i multiply a decimal? with a double?

shosho s

shosho s

Apr 10 2016 4:11 AM
375
 
the properties :
public decimal? Percentage { get; set; } 
public double Amount { get; set;
 
foreach (var item in updatethis)
{
    item.Amount = (CPP.Percentage * CPP.Amount);
}
 Im getting this error Operator '*' cannot be applied to operands of type 'decimal?' and 'double'
 
how can i solve this ? thank you in advance :)

Answers (4)