可以透過 Math.Round 的方式來達成這個需求,下列示範取小數點後2位: 

Math.Round(99.2567, 2, MidpointRounding.AwayFromZero)

arrow
arrow
    全站熱搜

    ccchiu 發表在 痞客邦 留言(0) 人氣()