非整型判断是否是整数

double和decimal类型判断是否有小数位:

private static IsInteger(this decimal amount)
{
    
    
	if(amount % 1 == 0)
		return true;
	else
		return false;
}

猜你喜欢

转载自blog.csdn.net/Helloantoherday/article/details/122003675