Int32的值太大或太小 [英] Value was either too large or too small for an Int32
本文介绍了Int32的值太大或太小的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
可能重复:
int32的最大值是多少?
Mobileno = Convert.ToInt32(txmobileno.Text);
我在插入数据库时遇到的错误
error i amm getting while inserting in to database
推荐答案
为什么您会使用任何类型的整数来存储电话号码?
Why on earth would you use an integer of any type to store a phone number?
您无法对1进行有意义的算术运算,并且会丢失所有前导零.
You can't meaningfully do any arithmetics on one and you lose all leading zeroes.
使用字符串代替.
这篇关于Int32的值太大或太小的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文