Possible Duplicate:
Converting a string to a char array
I’m coding the following
Sub Main()
For index As Integer = 0 To "foo".Length - 1
Console.WriteLine("foo".Chars(index))
Next
Console.WriteLine("press [enter] to exit")
Console.Read()
End Sub
Is there a property in the String class that will return an array of Char?
So as an alternative to the above I could do something like:
Sub Main()
For each c as Char in ConvertToCharArray("foo")
Console.WriteLine(c.ToString())
Next
Console.WriteLine("press [enter] to exit")
Console.Read()
End Sub
ref
Very similar SO Question HERE
System.Stringis aIEnumerable(Of Char)already: