コードのセクションで、DataTable と DataTableReader を使用して SQLite データベースから情報を取得し、リストに追加します。プログラムが reader.GetValue 行に到達すると、プログラムは ArgumentOutOfRangeException をスローします。私が知る限り、これが起こる理由はありません。
DataTable dt = db.GetDataTable(Program.CONN, "SELECT ID FROM table WHERE column LIKE 'False%'");
using (DataTableReader dtr = dt.CreateDataReader())
{
while (dtr.Read())
{
int rt = 0;
foreach (DataRow dr in dt.Rows)
{
string line = dtr.GetValue(rt).ToString();//Arguement out of range exception being thrown here
idList.Add(line);
rt++;
}
}
}