Re: [ADVANCED-DOTNET] Write out the alphabet

2008-03-17 Thread Harley, Chay
Keeping as close to your original code as possible... : for (int letter = Convert.ToInt32('a'); letter <= Convert.ToInt32('z'); letter++) Console.WriteLine("{0} {1}", (char)letter, letter.ToString()); HTH, -Chay Harley -Original Message- From: Discussion of advanced .NET topics.

Re: [ADVANCED-DOTNET] Write out the alphabet

2008-03-17 Thread Mike Houston
You can try for (int i = 65; i < (65 + 26); i++) { Console.WriteLine((char)i); } That should write out A-Z. Hope it helps you --- Nexus6Studio.net --- -Original Message- From: Discussio

Re: [ADVANCED-DOTNET] Write out the alphabet

2008-03-17 Thread David Walker
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: [ADV

Re: [ADVANCED-DOTNET] Write out the alphabet

2008-03-17 Thread R. Rogers
Steve and Greg, Thanks for your help. Richard -Original Message- From: Discussion of advanced .NET topics. [mailto:[EMAIL PROTECTED] On Behalf Of Steve Johnson Sent: March 17, 2008 11:55 PM To: ADVANCED-DOTNET@DISCUSS.DEVELOP.COM Subject: Re: [ADVANCED-DOTNET] Write out the alphabet On M

Re: [ADVANCED-DOTNET] Write out the alphabet

2008-03-17 Thread Greg Young
misunderstood question ... just cast them to ints in your loop ... On Mon, Mar 17, 2008 at 9:07 PM, Greg Young <[EMAIL PROTECTED]> wrote: > chars are numbers underneath ... > > Try Console.WriteLine((int) Letter) > > if you look at an ASCII table http://www.asciitable.com/ 'a' - 'z' are > conve

Re: [ADVANCED-DOTNET] Write out the alphabet

2008-03-17 Thread Steve Johnson
On Mon, Mar 17, 2008 at 9:48 PM, R. Rogers <[EMAIL PROTECTED]> wrote: > 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 o

Re: [ADVANCED-DOTNET] Write out the alphabet

2008-03-17 Thread Greg Young
chars are numbers underneath ... Try Console.WriteLine((int) Letter) if you look at an ASCII table http://www.asciitable.com/ 'a' - 'z' are conventiently in order numerically ... Cheers, Greg On Mon, Mar 17, 2008 at 8:48 PM, R. Rogers <[EMAIL PROTECTED]> wrote: > The Char datatype isn't as wie

[ADVANCED-DOTNET] Write out the alphabet

2008-03-17 Thread R. Rogers
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 appreciat

Re: [ADVANCED-DOTNET] Retrieving Font from Resource File

2008-03-17 Thread Peter Ritchie
I haven't tried it, but you could try using PrivateFontCollection.AddMemoryFont(). Based on signature, something like the following? // load of font resource and retrieval of it's length performed previous GCHandle gcHandle = GCHandle.Alloc(loadedFontResource, GCHandleType.Pinned); try { privat

[ADVANCED-DOTNET] Retrieving Font from Resource File

2008-03-17 Thread Peter Vertes
*Hi List,* I have a font embedded inside a resource in one of my assemblies but I can't seem to able to retrieve it. Correction, I am able to retrieve it but the only way I can do it is by saving the stream of data coming from the resource file to the disk and then loading the saved font into