shosho s

shosho s

  • NA
  • 137
  • 98.8k

How can i multiply a decimal? with a double?

Apr 10 2016 4:11 AM
 
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)