title: C# double datatype gives a 0 always
body: <p>I have the following function that typically need to return a value. I calculate the value in a calculator app and I get values just fine. But in the program below the value variable value is always 0. I have tried using long, double, float but nothing works. Please help.</p>
  
  <pre><code> public string CalculateElapsedPercent(DateTime endTime, DateTime startTime)
          {
              string result = string.Empty;
              DateTime currentTime = DateTime.Now;
              if (currentTime &gt; endTime)
              {
                  result = " (100 %)";
                  return result;
              }
              long nr = (currentTime - startTime).Ticks;
              long dr = (endTime - startTime).Ticks;
              double value = (nr / dr) * 100.0;
              result = " (" + value.ToString() + " %)";
              return result;
          }
  </code></pre>