What's the equivalent of Delphi's RoundTo() in C#?

What's the equivalent of Delphi's RoundTo() in C#?

I am not very familiar with Delphi and I am aware of C#'s Math.Round() but am not sure how equivalent they are. Math.Round() has several overloads and RoundTo() has two.

Answers


The equivalent method is Math.Round. You need to use the overload which offers the functionality that you need, whatever that is.

The Delphi RoundTo function is not overloaded and is best matched with this overload of Math.Round:

public static double Round(
    double value,
    int digits
)

Need Your Help

Why does internet explorer 8 fail to locate jpg files that other browsers can find?

internet-explorer-8 url

The following URL doesn't display for me in Internet Explorer 8. I even tried compatibility mode and it didn't fix the issue.