繰り返してOleDbDataReader
その要素を入れる方法はArrayList
?
これが私のコードです:
// ...
ArrayList list = new ArrayList();
while(myReader.Read())
{
foreach(string s in myReader) // I got an Exception here
{
list.Add(s);
}
}
// ...
Label lbl = new Label();
lbl.Text = list[i] as string;
そしてここに例外があります:
System.InvalidCastException: Unable to cast object of type 'System.Data.Common.DataRecordInternal' to type 'System.String'.