Click here to Skip to main content
15,881,803 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi, I need to convert each array generated by two function to string array in order to pass it as string array to another function ....thanks in advance

VB
Function ConvertIntToString(ByVal intParameter As Integer)

       Return intParameter.ToString()

   End Function

   Function test(ByVal m() As Integer)

  Dim ss() As String  = Array.ConvertAll(int,string) ( m,new Converter(int,string)
  (ConvertIntToString)


   End Function


Example
suppose that an integer array is {1,2,3} it will be "{1,2,3}" as string
Posted
Updated 28-Nov-15 23:14pm
v3
Comments
PIEBALDconsult 28-Nov-15 11:57am    
Well, have at it; don't let us get in the way.
Member 12101107 28-Nov-15 12:13pm    
it just a numeric array like that {1,2,0,3}
Maciej Los 28-Nov-15 12:52pm    
What have you tried? Where are you stuck?
By string array, you mean string representation of number: '1' or 'one'?
Member 12101107 28-Nov-15 13:40pm    
I mean 1 not one this is my code

Function ConvertIntToString(ByVal intParameter As Integer)

Return intParameter.ToString()

End Function

Function test(ByVal m() As Integer)

Dim ss() As String = Array.ConvertAll(int,string) ( m,new Converter(int,string)
(ConvertIntToString)


End Function
ZurdoDev 28-Nov-15 15:16pm    
1. Reply to comments so that the user is notified.
2. What is your question? I sure hope it is not for someone to do all this work for you.

1 solution

Try this-
VB
stringArray = intArray.[Select](Function(n) Convert.ToString(n)).ToArray()

This will give you the string array.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900