Ascii value of char. in C#

S

sajit

hi folks,

I am developing a module in asp.net with c# as code behind. The module
is used to encrypte the password. The problem is how to find the ascii
value of particular character.

Any help is appreciated.
Thank You.
 
B

Ben Rush

using System;
using System.Collections.Generic;
using System.Text;
using System.Drawing;
using System.Diagnostics;
using System.Management;
using System.Runtime.InteropServices;
using System.IO;

namespace TestingGroundsCSharpConsole
{
class Program
{
static void Main(string[] args)
{
Byte[] bytes = ASCIIEncoding.ASCII.GetBytes("My String");
foreach (Byte b in bytes)
{
Console.Write(b.ToString() + ".");
}
Console.Read();
}
}
}
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,013
Latest member
KatriceSwa

Latest Threads

Top