본문 바로가기

.NET/C#

c# 소수점 4자리 이하 버리기

소수점 4자리 이하 버리기


var avail =  1.002000009;

var qty = Math.Truncate(avail * 100000) / 100000;


위와같이 하면 됩니다.