如何从c#中以对象数组格式存储的arraylist中检索数据

时间:2015-04-11 06:17:25

标签: c#

ArrayList aStru = new ArrayList();
aStru.Add(new Object[] { "board_id"  , "N" , LEN_ID, 0, "PRIMERY_KEY"});
aStru.Add(new Object[] { "board_name", "VC", 50    , 0, ""           });
aStru.Add(new Object[] { "description","VC", 100   , 0, ""           });

我尝试检索数据

for( nCtr=0; nCtr < (aStru.count); nCtr++ )
{
Object[] obj = (Object)aStru[nCtr];
}

请帮助我,我如何在c#中从这种格式的arraylist中检索数据。

1 个答案:

答案 0 :(得分:0)

更改为Object[] obj = (Object[])aStru[nCtr]