access array from gcnew?

Background:
I've been reading through some c++ tutorials, and I decided to try make a program to edit certain bytes of a file based off of user input. Up until now, everything I've been programming has been run in command prompt (except for the programs I've made in visual basic).

Anyways, I made a form for this program I'm making. It has a button to load the file, and a textbox for user input.

On button click, it displays the first few characters of the file with this
1
2
3
4
5
6
7
8
		if(openFileDialog->ShowDialog() == System::Windows::Forms::DialogResult::OK)
      {

         System::IO::StreamReader ^ sr = gcnew
            System::IO::StreamReader(openFileDialog->FileName);
         MessageBox::Show(sr->ReadToEnd);
         sr->Close();
      }


within sr is an array called byteBuffer[]. How would I get the messagebox to show just one byte? That is, how do I access byteBuffer[byte here] from within sr?
Supply the code for StreamReader!
Topic archived. No new replies allowed.