本文整理自网络,侵删。
会返回异常
Integer.Parse(string)
不会返回异常
Integer.tryParse('12',i);
结果:true 12
Integer.tryParse('12a',i);
结果:false 12
Integer.tryParse('a12',i);
结果:false 0
Integer.tryParse('1a2',i);
结果:false 1――――――――――――――――
原文链接:https://blog.csdn.net/ozhy111/article/details/81942924
相关阅读 >>
Delphi几个进制相关的代码(hextoint、hextoasc)
Delphi 中 findwindow 和 findwindowex 的语法和用法
Delphi firemonkey处理图形的方式与vcl处理图形的方式大不相同
Delphi2010新功能:tdirectory.getfiles 支持通配符
更多相关阅读请进入《Delphi》频道 >>