title: How to convert Decimal to Double in C#?
body: <p>I want to assign the decimal variable &quot;trans&quot; to the double variable &quot;this.Opacity&quot;.</p>
  <pre class="lang-cs prettyprint-override"><code>decimal trans = trackBar1.Value / 5000;
  this.Opacity = trans;
  </code></pre>
  <p>When I build the app it gives the following error:</p>
  <blockquote>
  <p>Cannot implicitly convert type decimal to double</p>
  </blockquote>