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

I am using vb.net 2008 release and I was wondering if there is a way to convert an array type to another array type. For example, say I flatten an array as a string and then I want to convert the array to an integer data type for sorting, how would I go about that?

+2


a source to share


1 answer


You can call Array.ConvertAll

:



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

      

+2


a source







All Articles