Converting Decimal to Double in C#?

后端 未结 3 1186
既然无缘
既然无缘 2021-02-06 20:21

I have a variable which is storing as decimal:

decimal firststYrComp = Int16.Parse(tb1stYr.Text.ToString());

Now I have this to get typecasted

3条回答
  •  無奈伤痛
    2021-02-06 20:51

    You can use decimal's built in converter.

    decimal decimalValue = 5; 
    double doubleValue = decimal.ToDouble(decimalValue);
    

提交回复
热议问题