title: How can I customize the behavior of Math.Round in .NET?
body: <p>I have to use a round method that follows this behavior:</p>
  
  <p>7.00  -> round -> 7<br>
  7.50  -> round -> 7<br>
  7.51  -> round -> 8</p>
  
  <p>I tried to use Math.Round, but it works a little bit different.</p>
  
  <pre><code>Dim val As Decimal = 7.5
  Dim a As Decimal = Math.Round(val, 0) ' -&gt; 8
  Dim b As Decimal = Math.Round(val, 0, MidpointRounding.AwayFromZero) ' -&gt; 8
  Dim c As Decimal = Math.Round(val, 0, MidpointRounding.ToEven) ' -&gt; 8
  </code></pre>
  
  <p>How can I implement my rounding logic?</p>