Seriously? It's extremely simple. Here I'll give a tutorial
if (ofd.ShowDialog() == DialogResult.OK) // This is the if statement for ShowDialog
        {
          try
          {
            if ((myStream = ofd.OpenFile()) != null) // This is the myStream so that it can open the file dialog
            {
              using (myStream) // This using a myStream
              {
                TEXTBOXHERE0.Text = File.ReadAllText(ofd.FileName); // This will copy the code from the files into your execution box
              }
            }
          }
          catch (Exception ex) // The exception or error
          {
            MessageBox.Show("Error: Could not read file from disk. Original error: " + ex.Message);
          }
Cancel
Post