Iterating through the Alphabet


/ Published in: C#
Save to your folder(s)

Oddly, using Char.GetNumericValue() resulted in numbers that couldn't be cast back to a char using Convert.ToChar().


Copy this code and paste it in your HTML
  1. char alphaStart = Char.Parse("A");
  2. char alphaEnd = Char.Parse("Z");
  3. for(char i = alphaStart; i <= alphaEnd; i++)
  4. {
  5. string anchorLetter = i.ToString();
  6. }

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.