| re: arrays of integers
Alternatively, you can use the Microsoft.VisualBasic.Strings.Join function.
Something like the following: -
Dim test() As Integer = {1, 2, 3, 4, 5, 6}
Dim result As String = Join(ArrayList.Adapter(test).ToArray(), ";")
Unfortunately you can't pass an array of value types directly to a parameter
expecting an array of objects, hence the use of the ArrayList Adapter
method.
Nick Hall
"Gerry O'Brien [MVP]" <gerry dot obrien at gmail dot com> wrote in message
news:%23HC9oJ9pEHA.376@TK2MSFTNGP14.phx.gbl...[color=blue]
> Create a loop that will read through all of the items in the array and add
> the item, plus the comma, to a stringbuilder object.
>
> Dim retString As New StringBuilder
>
> For intcounter As Integer = 0 To arrInts.Length - 2
>
> retString.Append(arrInts(intcounter) & ", ")
>
> Next
>
>
> --
> Gerry O'Brien [MVP]
> Visual Basic .NET(VB.NET)
>
>
>
>
> "rodchar" <rodchar@discussions.microsoft.com> wrote in message
> news:FABF8998-071E-4BE3-9E73-D09B06B28873@microsoft.com...[color=green]
>> Hey all,
>>
>> I have an array of numbers. What's the best way to get those numbers into
>> one text field semicolon delimited?
>>
>> thanks ,
>> rodchar
>>[/color]
>
>[/color] |