Login | Register   
LinkedIn
Google+
Twitter
RSS Feed
Download our iPhone app
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   FORUMS  |   TIP BANK
Browse DevX
Sign up for e-mail newsletters from DevX


Tip of the Day
Language: VB.NET
Expertise: Advanced
Nov 29, 2006

Iterate Through Characters in a String Using String.ToCharArray

VB.NET supports String.ToCharArray. You can use it to change a string into an array of characters so you can easily iterate through them:

Dim intCounter As Integer
   Dim chrArray() As Char
   chrArray = strInput.ToCharArray

   'Iterate through the string.
   For intCounter = 0 To chrArray.Length - 1
      MsgBo>:chrArray(intCounter))
   Next

End Sub
Harish Lalwani
 
Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

Sitemap