you can do

var allLetters = "aäbcç...";
foreach (var letter in letters)
  doSomething(letter);

So the abstraction is not leaky anymore. One could provide a factory
that accepts a culture as a parameter to create the allLetterString...
allLetters = AlphabetFactory.GetLetters(myCulture);
in case of the default culture, just do the int to char trick.

On Tue, Mar 18, 2008 at 9:42 AM, John Warner <[EMAIL PROTECTED]> wrote:
> Imports System.Text.Encoding
>
>  I know C# is using.
>
>  Then look at ASCIIEncoding.  functions()
>  This gives you the ability to convert string data to a byte array of
>  numbers H=73 and also provides a method to convert 73 back to H. I don't
>  have it all in front of me right now, but this namespace provides what you
>  need.
>
>  John Warner
>
>
>
>
>
>  > -----Original Message-----
>  > From: Discussion of advanced .NET topics.
>  > [mailto:[EMAIL PROTECTED] On Behalf Of R. Rogers
>
> > Sent: Monday, March 17, 2008 11: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 DevelopMentorR  http://www.develop.com
>
>
> >
>  > View archives and manage your subscription(s) at
>  > http://discuss.develop.com
>  >
>
>  ===================================
>  This list is hosted by DevelopMentor(R)  http://www.develop.com
>
>  View archives and manage your subscription(s) at http://discuss.develop.com
>



-- 
Jan
___________________
[EMAIL PROTECTED]
www.limpens.com
+55 (11) 3082-1087
+55 (11) 3097-8339

===================================
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