开发者

how to convert "system.object" {string} to integer

I am trying to read and write values in registry. I get return something like "system.object"{st开发者_如何学编程ring} from reading function. I need to assign the value to a integer variable.

How can i do it?


Dim return As Boolean

Dim result as Int

return = Int32.TryParse("yorstring", result)

where return indicates if function can convert string or not


yes you need to parse it using Int32.TryParse("your string", out result) the function will tell you where you can convert the string to int or not.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜