title: How can i solve a Math error between decimal and double?
body: <pre><code>return Math.Ceiling((_BytesReceived / _TotalBytesToReceive) * 100);
  </code></pre>
  
  <p>_BytesReceived is int and also _TotalBytesToReceive is int.</p>
  
  <p>The error is: </p>
  
  <blockquote>
    <p>Severity  Code    Description Project File    Line    Suppression State
    Error   CS0121  The call is ambiguous between the following methods or properties: 'Math.Ceiling(decimal)' and 'Math.Ceiling(double)'   DownloadMultipleFiles</p>
  </blockquote>
  
  <p>The full function:</p>
  
  <pre><code>public int ProgressPercentage
      {
          get
          {
              if (_TotalBytesToReceive &gt; 0)
              {
                  return Convert.ToInt32(Math.Ceiling((_BytesReceived / (double)_TotalBytesToReceive) * 100d));
              }
              else
              {
                  return -1;
              }
          }
      }
  </code></pre>