title: C# - Convert decimal to int32
body: <p>I have the following code:</p>
  
  <pre><code>int a = Convert.ToInt32(4.5m);
  int b = Convert.ToInt32(5.5m);
  
  Console.WriteLine(a);
  Console.WriteLine(b);
  </code></pre>
  
  <p>And here's the output:</p>
  
  <pre><code>4
  6
  </code></pre>
  
  <p>Why does <code>Convert.ToInt32</code> rounds decimal values to the nearest even number?</p>