title: Missing a cast when using Math.Ceiling
body: <p>I've just started working with C# and Visual Studio for college, and I'm struggling with using the <code>Math.Ceiling</code> in order to have a float value round up to the next integer before it's outputted.</p>
  
  <p>Visual Studio says I'm missing a cast, but I don't really know where. It's probably really simple, but being new I don't really know where to start.
  The final line shown is where I've got a problem.</p>
  
  <p>I could just do with someone telling me where I'm going wrong here.</p>
  
  <p>I tried using a <code>float.Parse</code> around the <code>Math.Ceiling</code> but that doesn't work apparently</p>
  
  <pre class="lang-cs prettyprint-override"><code>const float FencePanelWidth = 1.5f;
  float GWidth;
  float GLength;
  float GPerimetre;
  float FencePanelsNeed;
  float FencePanelsNeed2;
  
  Console.Write("");
  Console.Write("");
  GWidth = float.Parse(Console.ReadLine());
  Console.Write("");
  GLength = float.Parse(Console.ReadLine());
  GPerimetre = (GLength * 2) + GWidth;
  FencePanelsNeed = GPerimetre / FencePanelWidth;
  
  FencePanelsNeed2 = Math.Ceiling(FencePanelsNeed);
  </code></pre>
  
  <p>If <code>FencePanelsNeed</code> was say 7.24, I'd want <code>FencePanelsNeed2</code> to be 8.</p>