1楼那个如果输入的是浮点数,也会被你强制转成整数了吧人家是说要判断整数publicboolisInteger(Stringnumber){try{doubleb=Convert.ToDouble(number);returnb%10==0;}catch{returnfalse;}}