c# 문자열 포맷 N0과 #,###의 반올림 차이
double testDouble = 2.5;
Text = testDouble.ToString("N0"); // 2
Text = testDouble.ToString("#,###"); // 3
N은 standard numeric format string이다.
On .NET Core 2.1 and later, the runtime selects the result with an even least significant digit (that is, using MidpointRounding.ToEven).
Standard numeric format strings
은행원의 반올림 즉 짝수에 가깝게 올리거나 내린다.
#은 custom numeric format string이다.
The “##” format string causes the value to be rounded to the nearest digit preceding the decimal, where rounding away from zero is always used.
The “#” custom specifier
우리가 흔히 하는 올리는 반올림으로 처리한다.