Take the 2-minute tour ×  Well, I have a function that takes
string array as input..  I have a string to process from that
function..   Dim str As String = "this is a string"  func(// How
to pass str ?)  Public Function func(ByVal arr() As String)
// Processes the array here End Function  I have also tried :
func(str.ToArray)  // Give error since it converts str to char
array instead of String array.  Please Help !!  share|improve
this question How do you want it turned into an array? Delimited
by spaces? –  Jodaka Jul 29 '11 at 5:13 No.. nothing like that..
Simply convert "mystring" to an array with array with single
element "mystring". –  Yugal Jindle Jul 29 '11 at 5:16  6
Answers 6  up vote 3 down vote accepted  With VB10, you can
simply do this:   With an older version you'll have to do:
func(New String() {str}) share|improve this answer  Just
instantiate a new array including only your string  Sub Main()
Dim s As String = "hello world"     Print(New String() {s}) End
Sub  Sub Print(strings() A