Hi
I want to round the decimals like :
2.1 to 2.0
2.2 to 2.0
2.3 to 2.5
2.4 to 2.5
2.5 to 2.5
2.6 to 2.5
2.7 to 2.5
2.8 to 3.0
2.9 to 3.0
How do we do that in C#?
Hi
I want to round the decimals like :
2.1 to 2.0
2.2 to 2.0
2.3 to 2.5
2.4 to 2.5
2.5 to 2.5
2.6 to 2.5
2.7 to 2.5
2.8 to 3.0
2.9 to 3.0
How do we do that in C#?
You can do =>
decimal nValue = 2.2m;
Console.WriteLine("{0} --> {1}", nValue, Math.Round(nValue * 2, MidpointRounding.AwayFromZero) / 2);
8 people are following this question.
Insert a node as child ,before or after a node in nested dynamic JSON Node using C#
Visual Studio 2019: Undefined behavior in a C++/CLI wrapper project.
Example for how to get Package Metadata from Azure DevOps Rest-Api Artifacts using c#
How to collapse individual nested grids/stackpanels inside a grid?