private void btnResize_Click(object sender, EventArgs e) { Width = 580; Height = 487; // string []buffer =new byte[ richTextBox2.Text]; byte[] buffer = Encoding.Default.GetBytes(richTextBox2.Text); // byte[] buffer = BitConverter.GetBytes(Convert.ToDouble(richTextBox2.Text)); // From byte array to string string bb = ""; int i = 0; ////int numBytesToRead = buffer.Length; while (i < richTextBox2.TextLength) { if ((i % 8) == 0) { bb = bb + "\n"; bb = bb + i.ToString("X8"); bb = bb + "\t"; } else if ((i % 4) == 0) { bb = bb + "\t"; } bb = bb + buffer[i].ToString("X2"); // modified on 30june2014 i = i + 1; } richTextBox2.Text = bb; }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)