title: Learning C# and I have a casting question
body: <p>W3 schools provides the following code:</p>
  <pre><code>double myDouble = 9.78;
  int myInt = (int) myDouble;    // Manual casting: double to int
  
  Console.WriteLine(myDouble);   // Outputs 9.78
  Console.WriteLine(myInt);      // Outputs 9
  </code></pre>
  <p>On line 2, if I have already declared that the variable type is 'int', why must I also cast myDouble as an integer when I have already declared it to be one?</p>
  <p>I see the same thing in the book I am using, where the line reads:</p>
  <pre><code>float num1 = (float) 20.9;
  decimal num2 = (decimal) 20.9;
  </code></pre>
  <p>Again, we're putting the data type in parentheses after we've already told it to use that specific data type. I am SURE that there is a reason on the backend, I simply do not know what it is.</p>