laitimes

C# programming rounds decimalsSource code: Program Source: Conclusion:

author:Shlain Ratio

When C# programming rounds decimals, the round function needs to follow the banker's rounding method, that is, "4 rounds 6 into 5 considerations, 5 after non-0 can enter 1, 5 after 0 to see parity, 5 before even to be rounded, 5 before odd need to enter one"

C# programming rounds decimalsSource code: Program Source: Conclusion:

Program interface

<h1 class="pgc-h-arrow-right" data-track="4" > program source code:</h1>

<h1 class="pgc-h-arrow-right" data-track="8" > Conclusion:</h1>

With this example, you can master the use of TryParse method parameter passing, learn to use the drop-down box control, and assign values to the drop-down box list through the for loop, add the list through Items.Add, and master the principles that the Round method of the Math class follows when rounding!

If you like it, please pay attention to the collection!

Read on