Solved Convert numeric array to string

Posted on 2006-05-05
Last Modified: 2007-11-27

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

I need to convert this to a string array


Question by:murbro
    LVL 19

    Accepted Solution

    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

    Author Comment

    Thanks very much!

    Featured Post

    What Should I Do With This Threat Intelligence?

    Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

    Join & Write a Comment

    This article explains how to create and use a custom WaterMark textbox class.  The custom WaterMark textbox class allows you to set the WaterMark Background Color and WaterMark text at design time.   IMAGE OF WATERMARKS STEPS Create VB …
    Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
    Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
    In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor ( If you're interested in additional methods for monitoring bandwidt…

    733 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    19 Experts available now in Live!

    Get 1:1 Help Now