ASCII array

C#

05/10/2018

Como eu poderia fazer para converter um array de char, para int, para se transformar nos valores de ASCII? Isso é o que fiz até agora:

string texto;
Console.Write("Digite o texto: ");
texto = Console.ReadLine();
int num;
num = texto.Length;
char[] nome = texto.ToCharArray();
int i;
int[] teste = new int[num];
for(i = 0; i < num; i++)
{
Console.WriteLine("", nome[i]);
}
Guilherme Oliveira

Guilherme Oliveira

Curtidas 0
POSTAR