byte array questions?

  • Thread starter Thread starter ph4dge
  • Start date Start date
P

ph4dge

I have converted a char array into a byte array and output the numbers into
a richtextbox, how do I then take these numbers and convert them back into
the word they were origionally and have it print to a new text box....???
 
I have converted a char array into a byte array and output the numbers into
a richtextbox, how do I then take these numbers and convert them back into
the word they were origionally and have it print to a new text box....???


Here is the code I'm using at the moment



private void button1_Click(object sender, EventArgs e)
{
char[] tempArray = new char[32000];

tempArray = richTextBox1.Text.ToCharArray();
string insertString ="";

for (int i = 0; i < tempArray.Length; i++)
{

byte aByte = Convert.ToByte(tempArray);
double aInt = Convert.ToByte(aByte);

aByte = (byte)aInt;

tempArray = Convert.ToChar(aByte);

insertString += aInt + " ";

}

richTextBox2.Text = insertString;
 
Back
Top