Visual C# でフォーム アプリを作成しています。私の問題は、赤で下線が引かれたすべての列 (図を参照) を読み取り、青の列をスキップする必要があることです。
readline または readblock メソッドを使用する必要があるかどうかはわかりません。また、赤い列がいつ終了するか、次の赤い列に移動する方法をプログラムはどのように知るのでしょうか。文字数を使用する必要がありますか?
これは私の現在のコードです:
private void button1_Click(object sender, EventArgs e)
{
OpenFileDialog ofd = new OpenFileDialog();
if (ofd.ShowDialog() == System.Windows.Forms.DialogResult.OK)
{
StreamReader sr = new StreamReader(File.OpenRead(ofd.FileName));
// constructor sr accesses streamreader class. In stream reader class we access method read to end
textBox1.Text = sr.ReadToEnd();
// fill textbox with this.
sr.Dispose();
}
}
漠然としていて申し訳ありません、私は初心者です - 本当に助けていただきありがとうございます。