mirror of
https://github.com/nsnail/ns-ext.git
synced 2025-04-19 19:42:51 +08:00
25 lines
427 B
C#
25 lines
427 B
C#
namespace NSExt.Extensions;
|
|
|
|
public static class DecimalExtensions
|
|
{
|
|
/// <summary>
|
|
/// 四舍五入后的近似值
|
|
/// </summary>
|
|
/// <param name="me">数字</param>
|
|
/// <param name="place">小数点位数</param>
|
|
/// <returns>处理后的值</returns>
|
|
public static decimal Round(this decimal me, int place)
|
|
{
|
|
var dec = Math.Round(me, place);
|
|
return dec;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|