Try the Math.Round
method. Here’s how:
Math.Round(76d / 100d, 0) * 100;
Math.Round(121d / 100d, 0) * 100;
Math.Round(9660d / 100d, 0) * 100;
More Related Contents:
- Math.Round doesn’t behave like i want it to. (X.0xxxxx numbers) [closed]
- Is double Multiplication Broken in .NET? [duplicate]
- Algorithm for simplifying decimal to fractions
- Double precision problems on .NET
- Best way to find all factors of a given number
- How to force a number to be in a range in C#? [duplicate]
- Fastest implementation of log2(int) and log2(float)
- Why does Math.Exp give different results between 32-bit and 64-bit, with same input, same hardware
- Deserialize JSON into C# dynamic object?
- How to read a text file reversely with iterator in C#
- Should I avoid ‘async void’ event handlers?
- How to tell whether a point is to the right or left side of a line
- How to find if a native DLL file is compiled as x64 or x86?
- How to fix a opacity bug with DrawToBitmap on WebBrowser Control?
- OpenXML tag search
- Passing a single item as IEnumerable
- How can I discover the “path” of an embedded resource?
- How can I perform a Unicode aware character by character comparison? [closed]
- Write to Windows Application Event Log without event source registration
- How do I create a C# app that decides itself whether to show as a console or windowed app?
- Caching in WCF?
- String Interpolation With Variable Content in C#
- System.Net.WebException: The remote name could not be resolved:
- Best way to programmatically configure network adapters in .NET
- Get a list of all UNC shared folders on a local network server
- .Net TPL: Limited Concurrency Level Task scheduler with task priority?
- What’s Wrong with an ArrayList?
- Why doesn’t Dictionary have AddRange?
- Can I cancel StreamReader.ReadLineAsync with a CancellationToken?
- Does FileSystemWatcher create its own thread?