字符串转换为整数无效 [英] COnvertion of string to integer is not valid
本文介绍了字符串转换为整数无效的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
为什么错误将字符串的COnvertion转换为整数在下面的ling中不正确呢?
Why the error is giving COnvertion of string to integer is not right formate in give ling below ?
Dim result As Integer = Integer.Parse(inpHide.Value.ToString())
这里inpHide是一个输入隐藏控件
here inpHide is a Input hidden control
推荐答案
找出并消除该错误的最佳解决方案是观察inpHide.Value,尝试调试您的应用程序.
欢呼声
Hi,
The best solution to find out and get rid of that error is to watch inpHide.Value, try to debug your application.
Cheers
使用类似的方法 [
Use methods like[^] Integer.TryParse
. These ensure that a value is converted to an integer only if it is an integer type.
这篇关于字符串转换为整数无效的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文