开发者

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

开发者 https://www.devze.com 2022-12-28 07:38 出处:网络
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百科 arr

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

精彩评论

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