Post: C# - How to convert integers to ASCII
04-13-2013, 05:51 PM #1
Pichu
RIP PICHU.
(adsbygoogle = window.adsbygoogle || []).push({});
    using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;


namespace ConsoleApplication2
{
class Program
{
static void Main(string[] args)
{
Console.Title = "Getting ASCII Values";
Random rand = new Random();
for (int i = 97; i < 123; i++)
{
char a = (char)i;
Console.Write(a);
}
Console.ReadKey();
}
}
}


the values 97-122 are values on the ASCII chart a-z lowercase. You simply convert the integer value by char.

(char)integer

The following user thanked Pichu for this useful post:

04-15-2013, 05:54 AM #2
Is C# pretty easy to get started with?
04-15-2013, 06:21 AM #3
Pichu
RIP PICHU.
Originally posted by another user
Is C# pretty easy to get started with?


If you have prior programming knowledge, yes. If not, then you will hit some roadblocks but it can be done.

The thing is, like many languages; you can learn a language but just because you know how to use a language doesn't make you good at it.

I'm currently writing C# tutorials on my site, I'm hoping to be done by the end of June. All of it will be written out and written into a pdf (which I will be selling for about 20-25); though I am offering presale of it for 10$ that will include updates + your name at the back of the book until the final release.

You must login or register to view this content.

The nice thing about C#; you can also learn to use XNA's library and program game.

Copyright © 2024, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo