限制整型或浮点型变量在某个特定范围内

使用方法RangeAttribute(int min, int max) , RangeAttribute(float min, float max)