title: Convert Minutes to Milliseconds
body: <p>The <code>Timer</code> class in Winforms has a property called, <code>Interval</code> and it </p>
  
  <blockquote>
    <p>Gets or sets the time, in milliseconds, before the Tick event is raised relative to the last occurrence of the Tick event.</p>
  </blockquote>
  
  <p>On my form I have a text box where the user can input in minutes how long they want to set the timer for.</p>
  
  <p>However I am unable to use the function I made to convert minutes to milliseconds:</p>
  
  <pre><code>public static double ConvertMinutesToMilliseconds(double minutes)
  {
    return TimeSpan.FromMinutes(minutes).TotalMilliseconds;
  }
  </code></pre>
  
  <p>My code looks like this:</p>
  
  <pre><code>if (result1 == DialogResult.Yes)
  {
      Timer tm;
      tm = new Timer();
  
      tm.Interval = int.Parse(textBox2.Text);
      tm.Interval = ConvertMinutesToMilliseconds(tm.Interval);
      tm.Tick += new EventHandler(button1_Click);
  
      string pastebuffer = DateTime.Now.ToString();
      pastebuffer = "### Edited on " + pastebuffer + " by " + txtUsername.Text + " ###";
      Clipboard.SetText(pastebuffer);
  
      tm.Start();
  }
  </code></pre>
  
  <p>My error is: <strong>Cannot implicitly convert type 'double' to 'int'. An explicit conversion exists (are you missing a cast?)</strong></p>