LoginSignup
0
0

More than 3 years have passed since last update.

【質問】C#について

Posted at

初心者過ぎる私ですが、教えていただきたいことがございます。
超初歩的な質問なのですが、コードを描いたのですがエラーの解決が出来ません。
どうかご教示頂けませんでしょうか?
よろしくお願い致します。
//rows => 行、cells => 列
dgv.Rows[rowNo].Cells[1].Value = reader[0];
dgv.Rows[rowNo].Cells[2].Value = reader[1];
dgv.Rows[rowNo].Cells[3].Value = reader[2];
dgv.Rows[rowNo].Cells[5].Value = reader[3];
dgv.Rows[rowNo].Cells[6].Value = reader[4];
dgv.Rows[rowNo].Cells[7].Value = reader[5];

                DateTime dt1 = dgv.Rows[0].Cells[3].Value.();
                DateTime dt2 = DateTime.Now;
                TimeSpan ts2 = dt1 - dt2;
                dgv.Rows[rowNo].Cells[4].Value = ts2;

DateTime dt1 = dgv.Rows[0].Cells[3].Value.();の部分ですが、
上記に記載のdgvの3列めの値を使いたいのですが上手く思いつきません。
お願い致します。

0
0
2

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0