📜  如何在 C# 中将 Decimal 转换为 Double? - C# 代码示例

📅  最后修改于: 2022-03-11 14:49:01.997000             🧑  作者: Mango

代码示例1
// Example 1
double transperancy = trackBar1.Value/5000;
this.Opacity = decimal.ToDouble(transperancy);

// Example 2 - with inline temp
this.Opacity = decimal.ToDouble(trackBar1.Value/5000);