close

 

使用 Match.round() 四捨五入 

double Result = Math.Round( 12.345, 2, MidpointRounding.AwayFromZero); 

//Result=12.35

 

reference: http://msdn.microsoft.com/en-us/library/ef48waz8.aspx 

arrow
arrow
    文章標籤
    c# match.round 四捨五入
    全站熱搜

    以戒為師 發表在 痞客邦 留言(0) 人氣()