0

I'm getting error for adding TotalCurrent(decimal) adding 0.1 but getting error

I have two methods called IncreaseAmplitude and DecreaseAmplitude of return type float in viewmodel where I'm trying to increment or decrement the TotalCurrent(bind to textbox) by 0.1 but getting error Operator '+' cannot be applied to type decimal and double

private float IncreaseAmplitude()
{
    TotalCurrent = TotalCurrent + 0.1;
}
private float DecreaseAmplitude()
{
    TotalCurrent = TotalCurrent - 0.1;
}

I want pass the methods to delegateCommand so while clicking on those buttons will increment or decrement the value by 0.1 I want to know how to update the textbox and where I'm going wrong?

wohlstad
  • 12,661
  • 10
  • 26
  • 39

0 Answers0