hey all ... just wondering if someone knows how to convert an array to a textbox. I have a StreamReader that reads in 3200 chars, and im tring to output them into a textbox, however it will only display one char. I have tried using a for loop to copy them also, but they just overwrite the first char.
Code:private void inputTextBox_KeyDown(object sender, KeyEventArgs e) { if(e.KeyCode == Keys.Enter) { string fileName; fileName = inputTextBox.Text; if(File.Exists(fileName)) { try { StreamReader stream = new StreamReader(fileName); stream.ReadBlock(ASCIIHeader, 0, 3200); outputFileTextBox.Text = Convert.ToString(ASCIIHeader); // problem only outputs one char ! } catch (IOException) { MessageBox.Show("Error reading from file", "File Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } } } }
Thanks for any help![]()



LinkBack URL
About LinkBacks



