开发者

how do you convert an array from one data type to another in vb.net?

I'm using vb.net 2008 edition and i was wondering if there a way to convert an array type to another array type. For instance say i dim an array as string and then want to convert the开发者_Go百科 array to the integer data type for sorting, how would i go about this?


You can call Array.ConvertAll:

intArray = Array.ConvertAll(stringArray, Function(s) Int32.Parse(s))
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜