Sucky way but..

for (char Letter = 'a'; Letter <= 'z';Letter = (char)((int)Letter+1) ) 

-----Original Message-----
From: Discussion of advanced .NET topics.
[mailto:[EMAIL PROTECTED] On Behalf Of R. Rogers
Sent: Tuesday, 18 March 2008 12:49 PM
To: ADVANCED-DOTNET@DISCUSS.DEVELOP.COM
Subject: [ADVANCED-DOTNET] Write out the alphabet

The Char datatype isn't as wieldly as I thought it would be in C#.
How can I write some simple code similar to this:

for (char Letter = 'a'; Letter <= 'z'; Letter++)
  Debug.Write(Letter.ToString());

It's the part of incrementing the char, that I can't figure out.

Any pointers are much appreciated,

Thanks.

Richard Rogers
http://www.RichardRogers.ca/
(MSN) [EMAIL PROTECTED]

===================================
This list is hosted by DevelopMentor(r)  http://www.develop.com

View archives and manage your subscription(s) at
http://discuss.develop.com

===================================
This list is hosted by DevelopMentorĀ®  http://www.develop.com

View archives and manage your subscription(s) at http://discuss.develop.com

Reply via email to