从字符串转换为整数 [英] converting from string to integer
问题描述
大家好,
如果我想从整数更改值并将其设置为字符串,则声明是什么?我曾经看到过使用CInt(CStr)进行转换,但是我不确定在哪个平台上进行转换.我来宾vb6.对于vb.net 2010,我注意到它使用ascw(label.text(count))..现在,如果有人知道我在哪里可以找到其他用于转换值的语法,例如:String,Double,Integer,请给我一个链接.我将不胜感激.
Hi all,
If i want to change the value from integer and set it as string, what is the declaration? I''ve used to see that to convert, by using CInt(CStr) but I''m not sure in what platform. I guest vb6. For vb.net 2010, I''m noticed that it using ascw(label.text(count)).. Right now, if someone know where i can find the other syntax for converting value eg: String, Double, Integer, please give me a link. I will be appreciate it.
推荐答案
使用Convert
方法.
Use theConvert
method.
Dim value as string
Dim result As Integer
result = Convert.ToInt32(value)
请参阅 http://msdn.microsoft.com/en-us/library/sf1aw27b.aspx#Y0 [^ ] .
See http://msdn.microsoft.com/en-us/library/sf1aw27b.aspx#Y0[^].
这篇关于从字符串转换为整数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!