How Close is the Javascript Math.Round to the C# Math.Round?
<p>I know from reading <a href="http://stackoverflow.com/questions/977796/in-c-math-round2-5-result-is-2-instead-of-3-are-you-kidding-me">this Stackoverflow question</a> that the complier will look at your number, decide if the midpoint is an even or odd number and then return the even number. The example number was 2.5 which rounded to a 3. I've tried my own little experiments to see what happens, but I have yet to find any specifications about this, or even if it would be consistant between browsers.</p>

<p>Here's an example javascript snippet using JQuery for the display:</p>

<pre><code>   $(document).ready(function() {
    $("#answer").html(showRounding());
});

function showRounding() {
    var answer = Math.round(2.5);
    return answer;
}
</code></pre>

<p>This returns a '3'.</p>

<p>What I would like to know is this: How close is the rounding in javascript to the the C# equivalent? The reason I'm doing this is because I would like to take a Javascript method that uses Math.Round and rewrite the same method into C# and would like to know that I would be able to get the same results after rounding a number.</p>
