title: C++, Windows Forms Application, Reading from a File
body: <p>I want to read a specific column/line from a file and save those to a variable. 
  So far I was able to read the entire text. But I can't get my code to only read a specific line/column. Here is what I have:</p>
  
  <pre><code>private: System::Void button6_Click_1(System::Object^  sender, System::EventArgs^  e) {
      Stream^ myStream; 
      OpenFileDialog^ openFileDialog1 = gcnew OpenFileDialog; 
  
      if (openFileDialog1-&gt;ShowDialog() == System::Windows::Forms::DialogResult::OK)
      {
          if( (myStream = openFileDialog1-&gt;OpenFile()) != nullptr )
          {
              String^ strfilename = openFileDialog1-&gt;InitialDirectory + openFileDialog1-&gt;FileName;
              String^ Readfile = File::ReadAllText(strfilename);
              myStream-&gt;Close();  
          }
      }
  }
  </code></pre>