Assign : Cannot multiply a System.String with a System.Double

Hi, I am getting a number from a row(eg 30). Then would like to times some amount(eg 1.50). But getting the following error.
image
image


image
How can I get over this error?

Thank you xoxo

Hi @sangasangasanga,

days*rowprice

After days “DOT” is present so its throwing the exception

image

Oops, my mistake but even after I took it out, I am still getting the same error.

image

Hi @sangasangasanga,

may be the days or rowprice data type in string format.

So Convert into Double

Convert.ToDouble(days)* Convert.ToDouble(rowprice)

Hi, I tried, still getting an error



Hi @sangasangasanga,

days is generic value.

So

Convert.ToDouble(days.Tostring)* Convert.ToDouble(rowprice)

3 Likes