Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 847
  • Last Modified:

VB.net/2005 Convert numeric array to string


I have an array that is of type Single in VB 2005.

I need to convert this to a string array


Murray Brown
Murray Brown
1 Solution
Fahad MukhtarDistinguished EngineerCommented:
use the Array.ConvertAll method which Converts an array of one type to an array of another type.

Dim SingleArray() As Single = {1, 2, 3}
Dim StringArray() As String = Array.ConvertAll(SingleArray, New Converter(Of Single, String)(AddressOf ConvertSingleToString))

' here is the definiation of ConvertSingleToString
Public Shared Function ConvertSingleToString(ByVal number As Single) As String
        Return number.ToString()
End Function
Murray BrownMicrosoft Cloud Azure/Excel Solution DeveloperAuthor Commented:
Thanks very much!

Featured Post

Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

Tackle projects and never again get stuck behind a technical roadblock.
Join Now