
{filelink=19561}
using System;
using System.Text;
class ExAsciiEnc
{
public static void Main()
{
ASCIIEncoding ascii = new ASCIIEncoding();
String unicodeString ="Pi (u03a0) et Sigma (u03a3).";
int indexDePi = unicodeString.IndexOf("u03a0");
int indexDeSigma = unicodeString.IndexOf("u03a3");
Byte[] encodedBytes = ascii.GetBytes(unicodeString);
foreach (Byte b in encodedBytes)
{
Console.WriteLine("[{0}]", b);
}
String decodedString = ascii.GetString(encodedBytes);
Console.WriteLine(decodedString);
}
}