Split a string apart into an array in VB .Net

Posted by on December 7, 2011 in Programming, VB .Net | 0 comments

I like using the Split function to break apart strings, but you’re forced to have a delimiter then. Passing it an empty string won’t return each character. If you want to convert a string into an array of characters so you can loop over each one, the solution is quite simple. Use the following code.

Dim charArr() As Char = myString.ToCharArray
If you enjoyed this post, please consider leaving a comment or subscribing to the RSS feed to have future articles delivered to your feed reader.

Leave a Comment

Your email address will not be published. Required fields are marked *